mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2026-01-01 06:06:41 +01:00
finished, functional API
This commit is contained in:
9
src/api/user/gNumberUsers.js
Normal file
9
src/api/user/gNumberUsers.js
Normal file
@ -0,0 +1,9 @@
|
||||
export async function gNumberUsers(request, reply, fastify, getNumberUsers) {
|
||||
try {
|
||||
const row = getNumberUsers.get();
|
||||
return reply.code(200).send({ n_users: row.n_users });
|
||||
} catch (err) {
|
||||
fastify.log.error(err);
|
||||
return reply.code(500).send({ error: "Internal server error" });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user