server
server copied to clipboard
Admin API
I'm thinking of an API for administrators, it would help dashboard development move along significantly, and would allow third-party instance managers to become a thing.
Routes might be:
- /admin/api/users/list - GET
- /admin/api/guilds/list - GET
- /admin/api/emojis/list - GET
- /admin/api/messages/list - GET
- others, like edit, delete, create, etc...
also lists need to be pageable
how you want to secure those endpoints?
@mafineeek maybe the first user that registers will have admin permissions over the instance and can manage everything else. Or they can set a password through the cli
I prefer a set password via CLI e.g. command flags
yes in general we should add cli options to the server
We should use https://github.com/75lb/command-line-args
#351
Just an outsiders perspective but I would prefer to use Environment Variables in place of command args because it's easier to set it once and not have to worry about. Plus using Node, environment variables can be set up to run as command line args.
Nothing here talks about command line args?
They talk about password setting above, And either the first registered user, or cli setting
Y'all seriously haven't considered a database column?
Use either that or flags (badges, essentially)