mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(api)!: align error codes with throw sites and image bounds (#2488)
This commit is contained in:
1 parent
4534822355
commit
d5bfa5a73d
99 files changed
+857
-4853
No files matched your search
@@ -20,7 +20,7 @@ import {
|
||||
import {ChannelNicknameOverrides} from '@fluxer/schema/src/domains/channel/ChannelSchemas';
|
||||
import {ReadStateResponse} from '@fluxer/schema/src/domains/gateway/GatewaySchemas';
|
||||
import {ChannelOverwriteTypeSchema, GeneralChannelNameType} from '@fluxer/schema/src/primitives/ChannelValidators';
|
||||
import {createBase64StringType} from '@fluxer/schema/src/primitives/FileValidators';
|
||||
import {base64LengthForBytes, createBase64StringType} from '@fluxer/schema/src/primitives/FileValidators';
|
||||
import {ContentWarningLevelSchema} from '@fluxer/schema/src/primitives/GuildValidators';
|
||||
import {QueryBooleanType} from '@fluxer/schema/src/primitives/QueryValidators';
|
||||
import {
|
||||
@@ -118,7 +118,7 @@ const ChannelUpdateCommon = ChannelCommonBase.extend({
|
||||
'Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override.',
|
||||
),
|
||||
...ChannelContentWarningFields,
|
||||
icon: createBase64StringType(1, Math.ceil(AVATAR_MAX_SIZE * (4 / 3)))
|
||||
icon: createBase64StringType(1, base64LengthForBytes(AVATAR_MAX_SIZE))
|
||||
.nullish()
|
||||
.describe('Base64-encoded icon image for group DM channels'),
|
||||
owner_id: SnowflakeType.nullish().describe('ID of the new owner for group DM channels'),
|
||||
@@ -181,7 +181,7 @@ const ChannelUpdateLinkRequest = ChannelUpdateCommon.extend({
|
||||
const ChannelUpdateGroupDmRequest = z.object({
|
||||
type: createNamedLiteral(ChannelTypes.GROUP_DM, 'GROUP_DM', 'Channel type (group DM)'),
|
||||
name: GeneralChannelNameType.nullish().describe('The name of the group DM'),
|
||||
icon: createBase64StringType(1, Math.ceil(AVATAR_MAX_SIZE * (4 / 3)))
|
||||
icon: createBase64StringType(1, base64LengthForBytes(AVATAR_MAX_SIZE))
|
||||
.nullish()
|
||||
.describe('Base64-encoded icon image for the group DM'),
|
||||
owner_id: SnowflakeType.nullish().describe('ID of the new owner of the group DM'),
|
||||
|
||||
Reference in new issue
Block a user