diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/assets/schemas.json | 12 | ||||
-rw-r--r-- | api/client_test/index.html | 8 | ||||
-rw-r--r-- | api/src/routes/guilds/#guild_id/index.ts | 1 | ||||
-rw-r--r-- | api/src/routes/guilds/#guild_id/member-verification.ts | 14 | ||||
-rw-r--r-- | api/src/routes/guilds/#guild_id/welcome-screen.ts (renamed from api/src/routes/guilds/#guild_id/welcome_screen.ts) | 4 | ||||
-rw-r--r-- | api/src/routes/guilds/index.ts | 2 | ||||
-rw-r--r-- | api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts | 16 |
7 files changed, 43 insertions, 14 deletions
diff --git a/api/assets/schemas.json b/api/assets/schemas.json index eac24adb..ae2426d1 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -6505,9 +6505,6 @@ } }, "additionalProperties": false, - "required": [ - "name" - ], "definitions": { "Embed": { "type": "object", @@ -6867,6 +6864,9 @@ "preferred_locale": { "type": "string" }, + "premium_progress_bar_enabled": { + "type": "boolean" + }, "name": { "maxLength": 100, "type": "string" @@ -6891,9 +6891,6 @@ } }, "additionalProperties": false, - "required": [ - "name" - ], "definitions": { "Embed": { "type": "object", @@ -10512,8 +10509,7 @@ "additionalProperties": false, "required": [ "channel_id", - "description", - "emoji_name" + "description" ] } }, diff --git a/api/client_test/index.html b/api/client_test/index.html index b438b492..7a3e4695 100644 --- a/api/client_test/index.html +++ b/api/client_test/index.html @@ -71,10 +71,10 @@ } </script> <script src="/assets/checkLocale.js"></script> - <script src="/assets/1e18f2aac02e172db283.js"></script> - <script src="/assets/681e53cdfefa5b82249a.js"></script> - <script src="/assets/7a036838c0a0e73f59d8.js"></script> - <script src="/assets/b6cf2184a7a05e7525ce.js"></script> + <script src="/assets/83ace7450e110d16319e.js"></script> + <script src="/assets/e02290aaa8dac5d195c2.js"></script> + <script src="/assets/4f3b3c576b879a5f75d1.js"></script> + <script src="/assets/699456246fdfe7589855.js"></script> <!-- plugin marker --> </body> </html> diff --git a/api/src/routes/guilds/#guild_id/index.ts b/api/src/routes/guilds/#guild_id/index.ts index 4ec3df72..45e30a74 100644 --- a/api/src/routes/guilds/#guild_id/index.ts +++ b/api/src/routes/guilds/#guild_id/index.ts @@ -20,6 +20,7 @@ export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> { afk_timeout?: number; afk_channel_id?: string; preferred_locale?: string; + premium_progress_bar_enabled?: boolean; } router.get("/", route({}), async (req: Request, res: Response) => { diff --git a/api/src/routes/guilds/#guild_id/member-verification.ts b/api/src/routes/guilds/#guild_id/member-verification.ts new file mode 100644 index 00000000..265a1b35 --- /dev/null +++ b/api/src/routes/guilds/#guild_id/member-verification.ts @@ -0,0 +1,14 @@ +import { Router, Request, Response } from "express"; +import { route } from "@fosscord/api"; +const router = Router(); + +router.get("/",route({}), async (req: Request, res: Response) => { + // TODO: member verification + + res.status(404).json({ + message: "Unknown Guild Member Verification Form", + code: 10068 + }); +}); + +export default router; diff --git a/api/src/routes/guilds/#guild_id/welcome_screen.ts b/api/src/routes/guilds/#guild_id/welcome-screen.ts index 7141f17e..5c7a9daa 100644 --- a/api/src/routes/guilds/#guild_id/welcome_screen.ts +++ b/api/src/routes/guilds/#guild_id/welcome-screen.ts @@ -10,7 +10,7 @@ export interface GuildUpdateWelcomeScreenSchema { channel_id: string; description: string; emoji_id?: string; - emoji_name: string; + emoji_name?: string; }[]; enabled?: boolean; description?: string; @@ -36,6 +36,8 @@ router.patch("/", route({ body: "GuildUpdateWelcomeScreenSchema", permission: "M if (body.description) guild.welcome_screen.description = body.description; if (body.enabled != null) guild.welcome_screen.enabled = body.enabled; + await guild.save(); + res.sendStatus(204); }); diff --git a/api/src/routes/guilds/index.ts b/api/src/routes/guilds/index.ts index 10721413..489dea49 100644 --- a/api/src/routes/guilds/index.ts +++ b/api/src/routes/guilds/index.ts @@ -9,7 +9,7 @@ export interface GuildCreateSchema { /** * @maxLength 100 */ - name: string; + name?: string; region?: string; icon?: string | null; channels?: ChannelModifySchema[]; diff --git a/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts b/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts index 723a5160..03162ec8 100644 --- a/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts +++ b/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts @@ -5,6 +5,22 @@ const router: Router = Router(); const skus = new Map([ [ + "978380684370378762", + [ + { + id: "978380692553465866", + name: "Nitro Lite Monthly", + interval: 1, + interval_count: 1, + tag_inclusive: true, + sku_id: "978380684370378762", + currency: "usd", + price: 0, + price_tier: null, + } + ] + ], + [ "521842865731534868", [ { |