summary refs log tree commit diff
path: root/src/schema
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-22 18:41:21 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-22 18:41:21 +0200
commitbb0dec2a9ff4467896356298dac6fa34fa314b9d (patch)
treeac79607c66fd3b196dec4cc5a0345fa61257751e /src/schema
parentfeat: add routing for unversioned api requests (diff)
downloadserver-bb0dec2a9ff4467896356298dac6fa34fa314b9d.tar.xz
:art: clean up code
widget.json.ts: just return instead of long if statement + add ?. operators for error handling
widget.png.ts make path universal
widget.ts: remove unnecessary guild db query as getPermission already checks it
Widget.ts make parameters required
Diffstat (limited to 'src/schema')
-rw-r--r--src/schema/Widget.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/schema/Widget.ts b/src/schema/Widget.ts

index 6a15a139..d37a38de 100644 --- a/src/schema/Widget.ts +++ b/src/schema/Widget.ts
@@ -1,7 +1,7 @@ // https://discord.com/developers/docs/resources/guild#guild-widget-object export const WidgetModifySchema = { - $enabled: Boolean, // whether the widget is enabled - $channel_id: String // the widget channel id + enabled: Boolean, // whether the widget is enabled + channel_id: String // the widget channel id }; export interface WidgetModifySchema {