Skip to content

Commit

Permalink
➕modified the existing /user/societies endpoint to include societies …
Browse files Browse the repository at this point in the history
…that the given user administers
  • Loading branch information
Plebbaroni committed Dec 5, 2024
1 parent a503826 commit dfd6459
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ app.get("/user/societies", async (req, res: Response) => {

const userID = sessionFromDB.userId;

const societies_joined = await prisma.society.findMany({
const societies = await prisma.society.findMany({
where: {
OR: [
{
Expand All @@ -422,11 +422,6 @@ app.get("/user/societies", async (req, res: Response) => {
},
});

const societies = {
joined: societies_joined,
administering: null,
};

return res.status(200).json(societies);
});

Expand Down

0 comments on commit dfd6459

Please sign in to comment.