Skip to content

Commit 5b7ff24

Browse files
authored
Allow any admin to toggle SNL banner (#1955)
1 parent 8ad352e commit 5b7ff24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/resolvers/admin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { SN_ADMIN_IDS } from '@/lib/constants'
2+
13
export default {
24
Query: {
35
snl: async (parent, _, { models }) => {
@@ -7,7 +9,7 @@ export default {
79
},
810
Mutation: {
911
onAirToggle: async (parent, _, { models, me }) => {
10-
if (me.id !== 616) {
12+
if (!me || !SN_ADMIN_IDS.includes(me.id)) {
1113
throw new Error('not an admin')
1214
}
1315
const { id, live } = await models.snl.findFirst()

0 commit comments

Comments
 (0)