fix: deny zaps for deleted items (#1158)
This commit is contained in:
parent
0fda8907e7
commit
512b08997e
|
@ -866,6 +866,10 @@ export default {
|
||||||
FROM "Item"
|
FROM "Item"
|
||||||
WHERE id = $1`, Number(id))
|
WHERE id = $1`, Number(id))
|
||||||
|
|
||||||
|
if (item.deletedAt) {
|
||||||
|
throw new GraphQLError('item is deleted', { extensions: { code: 'BAD_INPUT' } })
|
||||||
|
}
|
||||||
|
|
||||||
// disallow self tips except anons
|
// disallow self tips except anons
|
||||||
if (me) {
|
if (me) {
|
||||||
if (Number(item.userId) === Number(me.id)) {
|
if (Number(item.userId) === Number(me.id)) {
|
||||||
|
|
Loading…
Reference in New Issue