mirror of
https://github.com/Discreetly/server.git
synced 2026-04-17 03:00:55 -04:00
WIP - refactored Rooms model. Added ClaimCodes and Messages models
This commit is contained in:
@@ -140,33 +140,21 @@ app.use(
|
||||
})
|
||||
);
|
||||
|
||||
app.get('/identities', async (req, res) => {
|
||||
const identities = await prisma.identities.findMany();
|
||||
res.status(200).json(identities);
|
||||
})
|
||||
|
||||
app.get('/groups', async (req, res) => {
|
||||
const groups = await prisma.groups.findMany({
|
||||
include: {
|
||||
rooms: {
|
||||
include: {
|
||||
identities: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
res.status(200).json(groups);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
app.get(['/', '/api'], (req, res) => {
|
||||
pp('Express: fetching server info');
|
||||
res.json(serverConfig);
|
||||
});
|
||||
|
||||
app.get('/groups', async (req, res) => {
|
||||
const groups = await prisma.groups.findMany({
|
||||
include: {
|
||||
rooms: true
|
||||
}
|
||||
});
|
||||
res.status(200).json(groups);
|
||||
});
|
||||
|
||||
app.get('/api/rooms', (req, res) => {
|
||||
pp('Express: fetching rooms');
|
||||
res.json(loadedRooms);
|
||||
|
||||
Reference in New Issue
Block a user