summaryrefslogtreecommitdiff
path: root/packages/backend/src
diff options
context:
space:
mode:
authorSayamame-beans <61457993+Sayamame-beans@users.noreply.github.com>2023-09-06 13:02:33 +0900
committerGitHub <noreply@github.com>2023-09-06 13:02:33 +0900
commitbf303238f0394cbecbb06482a75f0e8917c09adc (patch)
tree822b48f466bbae14d26eaf06c6be4c94650c856e /packages/backend/src
parentfeat(frontend): remove renote with by admin privilege (#11789) (diff)
downloadsharkey-bf303238f0394cbecbb06482a75f0e8917c09adc.tar.gz
sharkey-bf303238f0394cbecbb06482a75f0e8917c09adc.tar.bz2
sharkey-bf303238f0394cbecbb06482a75f0e8917c09adc.zip
feat(backend): Webhook設定でsecretを空に出来るように (#11784)
* feat(backend): allow webhook secret to be empty * Update CHANGELOG.md
Diffstat (limited to 'packages/backend/src')
-rw-r--r--packages/backend/src/server/api/endpoints/i/webhooks/create.ts4
-rw-r--r--packages/backend/src/server/api/endpoints/i/webhooks/update.ts4
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
index d13af482b1..6daaacac07 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
@@ -34,12 +34,12 @@ export const paramDef = {
properties: {
name: { type: 'string', minLength: 1, maxLength: 100 },
url: { type: 'string', minLength: 1, maxLength: 1024 },
- secret: { type: 'string', minLength: 1, maxLength: 1024 },
+ secret: { type: 'string', maxLength: 1024, default: '' },
on: { type: 'array', items: {
type: 'string', enum: webhookEventTypes,
} },
},
- required: ['name', 'url', 'secret', 'on'],
+ required: ['name', 'url', 'on'],
} as const;
// TODO: ロジックをサービスに切り出す
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
index 8f2dcceaa9..012bacbbe8 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
@@ -34,13 +34,13 @@ export const paramDef = {
webhookId: { type: 'string', format: 'misskey:id' },
name: { type: 'string', minLength: 1, maxLength: 100 },
url: { type: 'string', minLength: 1, maxLength: 1024 },
- secret: { type: 'string', minLength: 1, maxLength: 1024 },
+ secret: { type: 'string', maxLength: 1024, default: '' },
on: { type: 'array', items: {
type: 'string', enum: webhookEventTypes,
} },
active: { type: 'boolean' },
},
- required: ['webhookId', 'name', 'url', 'secret', 'on', 'active'],
+ required: ['webhookId', 'name', 'url', 'on', 'active'],
} as const;
// TODO: ロジックをサービスに切り出す