spacebarchat / server

Spacebar server - A reimplementation of the Discord.com backend, built with Typescript and love
https://spacebar.chat
GNU Affero General Public License v3.0
1.46k stars 252 forks source link

Admin API #265

Open haydenwalker980 opened 3 years ago

haydenwalker980 commented 3 years ago

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 commented 3 years ago

Routes might be:

SamuelScheit commented 3 years ago

also lists need to be pageable

mafineeek commented 3 years ago

how you want to secure those endpoints?

SamuelScheit commented 3 years ago

@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

Intevel commented 3 years ago

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

SamuelScheit commented 3 years ago

yes in general we should add cli options to the server

Intevel commented 3 years ago

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

erkinalp commented 3 years ago

351

MelodicAlbuild commented 2 years ago

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.

TheArcaneBrony commented 2 years ago

Nothing here talks about command line args?

MelodicAlbuild commented 2 years ago

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

haydenwalker980 commented 2 years ago

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

Use either that or flags (badges, essentially)