breaking change: move /online route to /users

This commit is contained in:
Arya Kiran 2023-01-18 21:16:44 +05:30
parent 67b4d8842e
commit be59d303d0
Signed by untrusted user who does not match committer: arya
GPG Key ID: 842D12BDA50DF120
2 changed files with 6 additions and 6 deletions

View File

@ -16,9 +16,9 @@ By default publapi listens on 127.0.0.1:3000. You can change the port with the e
Additionally, you need to set the variable PUBLAPI_SHOUTRRRURL in order for notifications to work. Url Format can be found at https://containrrr.dev/shoutrrr/v0.5/services/matrix/ Additionally, you need to set the variable PUBLAPI_SHOUTRRRURL in order for notifications to work. Url Format can be found at https://containrrr.dev/shoutrrr/v0.5/services/matrix/
## Usage ## Usage
Currently, PublAPI has only two routes, /online and /signup. Currently, PublAPI has only two routes, /users and /signup.
| ROUTE | TYPE | EXTRA ARGS | DESCRIPTION | | ROUTE | TYPE | EXTRA ARGS | DESCRIPTION |
|---------|------|-----------------|------------------------------------| |---------|------|----------------------|---------------------------------|
| /online | GET | N/A | Returns the number of online users | | /users | GET | N/A | Return information about users. |
| /signup | POST | username, email, ssh | Creates a register script and notifies admins that a new registration request was sent.| | /signup | POST | username, email, ssh | Creates a register script and notifies admins that a new registration request was sent.|

View File

@ -97,10 +97,10 @@ func main() {
}) })
}) })
app.Get("/online", func(c *fiber.Ctx) error { app.Get("/users", func(c *fiber.Ctx) error {
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
return c.JSON(fiber.Map{ return c.JSON(fiber.Map{
"message": "/online is not supported on Windows", "message": "/users is not supported on Windows",
"status": c.Response().StatusCode(), "status": c.Response().StatusCode(),
}) })
} }