email can't be null, username removed since email can't be null
This commit is contained in:
@@ -43,7 +43,7 @@ router.get("/", async (req, res) => {
|
||||
{
|
||||
model: User,
|
||||
as: "owner",
|
||||
attributes: ["id", "username", "firstName", "lastName"],
|
||||
attributes: ["id", "firstName", "lastName"],
|
||||
},
|
||||
],
|
||||
limit: parseInt(limit),
|
||||
@@ -180,12 +180,12 @@ router.get("/:id", optionalAuth, async (req, res) => {
|
||||
{
|
||||
model: User,
|
||||
as: "owner",
|
||||
attributes: ["id", "username", "firstName", "lastName"],
|
||||
attributes: ["id", "firstName", "lastName"],
|
||||
},
|
||||
{
|
||||
model: User,
|
||||
as: "deleter",
|
||||
attributes: ["id", "username", "firstName", "lastName"],
|
||||
attributes: ["id", "firstName", "lastName"],
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -242,7 +242,7 @@ router.post("/", authenticateToken, requireVerifiedEmail, async (req, res) => {
|
||||
{
|
||||
model: User,
|
||||
as: "owner",
|
||||
attributes: ["id", "username", "firstName", "lastName", "email", "stripeConnectedAccountId"],
|
||||
attributes: ["id", "firstName", "lastName", "email", "stripeConnectedAccountId"],
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -307,7 +307,7 @@ router.put("/:id", authenticateToken, async (req, res) => {
|
||||
{
|
||||
model: User,
|
||||
as: "owner",
|
||||
attributes: ["id", "username", "firstName", "lastName"],
|
||||
attributes: ["id", "firstName", "lastName"],
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -378,7 +378,7 @@ router.delete("/admin/:id", authenticateToken, requireAdmin, async (req, res) =>
|
||||
{
|
||||
model: User,
|
||||
as: "owner",
|
||||
attributes: ["id", "username", "firstName", "lastName", "email"],
|
||||
attributes: ["id", "firstName", "lastName", "email"],
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -422,12 +422,12 @@ router.delete("/admin/:id", authenticateToken, requireAdmin, async (req, res) =>
|
||||
{
|
||||
model: User,
|
||||
as: "owner",
|
||||
attributes: ["id", "username", "firstName", "lastName"],
|
||||
attributes: ["id", "firstName", "lastName"],
|
||||
},
|
||||
{
|
||||
model: User,
|
||||
as: "deleter",
|
||||
attributes: ["id", "username", "firstName", "lastName"],
|
||||
attributes: ["id", "firstName", "lastName"],
|
||||
}
|
||||
],
|
||||
});
|
||||
@@ -492,7 +492,7 @@ router.patch("/admin/:id/restore", authenticateToken, requireAdmin, async (req,
|
||||
{
|
||||
model: User,
|
||||
as: "owner",
|
||||
attributes: ["id", "username", "firstName", "lastName"],
|
||||
attributes: ["id", "firstName", "lastName"],
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user