mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
fix: remove unnecessary code for updating questions
This commit is contained in:
parent
6593250945
commit
6e5ccd118d
@ -1,6 +1,5 @@
|
||||
const { logAdminEvent } = require('../../../../../../../lib/logging');
|
||||
const { updateStaffRoles } = require('../../../../../../../lib/users');
|
||||
const { randomUUID } = require('crypto');
|
||||
const { ApplicationCommandPermissionType } = require('discord.js');
|
||||
|
||||
module.exports.delete = fastify => ({
|
||||
@ -128,14 +127,11 @@ module.exports.patch = fastify => ({
|
||||
data: {
|
||||
...data,
|
||||
questions: {
|
||||
upsert: data.questions?.map(q => {
|
||||
if (!q.id) q.id = randomUUID();
|
||||
return {
|
||||
create: q,
|
||||
update: q,
|
||||
where: { id: q.id },
|
||||
};
|
||||
}),
|
||||
upsert: data.questions?.map(q => ({
|
||||
create: q,
|
||||
update: q,
|
||||
where: { id: q.id },
|
||||
})),
|
||||
},
|
||||
},
|
||||
select,
|
||||
|
Loading…
Reference in New Issue
Block a user