server icon indicating copy to clipboard operation
server copied to clipboard

Admin API

Open haydenwalker980 opened this issue 3 years ago • 12 comments

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.

haydenwalker980 avatar Aug 13 '21 15:08 haydenwalker980

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...

haydenwalker980 avatar Aug 13 '21 15:08 haydenwalker980

also lists need to be pageable

SamuelScheit avatar Aug 13 '21 15:08 SamuelScheit

how you want to secure those endpoints?

mafineeek avatar Aug 27 '21 19:08 mafineeek

@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

SamuelScheit avatar Sep 02 '21 20:09 SamuelScheit

I prefer a set password via CLI e.g. command flags

Intevel avatar Sep 04 '21 11:09 Intevel

yes in general we should add cli options to the server

SamuelScheit avatar Sep 04 '21 11:09 SamuelScheit

We should use https://github.com/75lb/command-line-args

Intevel avatar Sep 07 '21 08:09 Intevel

#351

erkinalp avatar Sep 12 '21 10:09 erkinalp

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.

MelodicAlbuild avatar Sep 29 '22 16:09 MelodicAlbuild

Nothing here talks about command line args?

TheArcaneBrony avatar Sep 29 '22 16:09 TheArcaneBrony

They talk about password setting above, And either the first registered user, or cli setting

MelodicAlbuild avatar Sep 29 '22 16:09 MelodicAlbuild

Y'all seriously haven't considered a database column?

Use either that or flags (badges, essentially)

haydenwalker980 avatar Oct 17 '22 05:10 haydenwalker980