Links

Users

All endpoints require you to be an admin or the owner and cannot be used with an API token.

Authentication

get
https://demo.getlynx.dev/api
/user/list
Get Users
post
https://demo.getlynx.dev/api
/user
Create User
post
https://demo.getlynx.dev/api
/user/role
Update user role
delete
https://demo.getlynx.dev/api
/user
Delete User

Manual Promotion

If you accidentally promote the wrong user or otherwise would like to make yourself an admin again, run these commands:
Connect to your database and enter your password:
mongosh --port 27017 --username user --authenticationDatabase admin
Switch to the lynx database:
use shortener
Demote the old owner to an admin
db.accounts.findOneAndUpdate({ role: "owner" },{ $set:{ role: "admin" } })
Promote yourself to owner
db.accounts.findOneAndUpdate({ username: "YOUR USERNAME" },{ $set:{ "role": "owner" } })
Last modified 5mo ago