fix(api): expected ids to be integers, not strings
All checks were successful
Build / build (push) Successful in 57s
All checks were successful
Build / build (push) Successful in 57s
This commit is contained in:
parent
9d79d8dbef
commit
00a4c749f0
@ -89,7 +89,7 @@ export const patch = async (request: Request, response: Response) => {
|
||||
}
|
||||
|
||||
export const del = async (request: Request, response: Response) => {
|
||||
const { ids } = request.body;
|
||||
let { ids } = request.body;
|
||||
const guildId = request.params.guildId;
|
||||
|
||||
if (!ids || !Array.isArray(ids)) {
|
||||
@ -97,6 +97,8 @@ export const del = async (request: Request, response: Response) => {
|
||||
return;
|
||||
}
|
||||
|
||||
ids = ids.map(id => Number(id));
|
||||
|
||||
try {
|
||||
await prisma.feed.deleteMany({ where: {
|
||||
id: { in: ids },
|
||||
|
Loading…
x
Reference in New Issue
Block a user