Skip to content
lrth06 edited this page Oct 1, 2022 · 6 revisions

Routes

General Information

The following routes are available:

Client Routes

Method Path Public Description
GET / true Application homepage
GET /auth/login true Login page
GET /auth/register true Register page
GET /rooms false Room directory
GET /rooms/:id false Individual room

API Routes

Method Path Public Description
GET /api/v1 true API homepage
POST /api/v1/auth/login true Login
POST /api/v1/auth/logout false Logout
GET /api/v1/users false Get all users
POST /api/v1/user true Register
GET /api/v1/user/:id false Get user information
PUT /api/v1/user/:id false Update user information
PATCH /api/v1/user/:id false Update user information
DELETE /api/v1/user/:id false Delete user
GET /api/v1/rooms false Get all rooms
POST /api/v1/room false Create room
GET /api/v1/room/:id false Get room information
PUT /api/v1/room/:id false Update room information
PATCH /api/v1/room/:id false Update room information
DELETE /api/v1/room/:id false Delete room
GET /api/v1/random false Get random uuid
POST /api/v1/upload false Upload file(s)
API Route Details
GET /api/v1
API homepage

Example Response:

Thank you for using the go-chat api, please refer to the documentation for more information.
POST /api/v1/auth/login
Login

Example Request:

    {
        "email": "test@test.com",
        "password": "password"
    }

Example Response:

    {
        "msg": "User logged in successfully",
        "token": "eyasdffdsUlkjljhbuioUJH.asjklfhawfeakljhfekajlefheklajh"
    }

Websocket Routes

Clone this wiki locally