mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
refactor(api): drop ignored location param from thread routes (#3371)
This commit is contained in:
1 parent
c14b7d4cb3
commit
70fd9e6331
6 files changed
+3
-77
No files matched your search
@@ -38,7 +38,6 @@ import {z} from 'zod';
|
||||
|
||||
const EXPERIMENT = {experiment: 'channel_threads'} as const;
|
||||
const EMOJI_NAME_MAX_LENGTH = 64;
|
||||
const LOCATION_MAX_LENGTH = 100;
|
||||
|
||||
export const ForumTagRequest = withSchemaMetadata(
|
||||
z.object({
|
||||
@@ -141,7 +140,6 @@ export const StartForumThreadRequest = withSchemaMetadata(
|
||||
.describe('Seconds a user has to wait before sending another message (0-21600)'),
|
||||
applied_tags: AppliedTagsType.optional(),
|
||||
message: ForumThreadMessageRequest.describe('The first message of the post'),
|
||||
location: z.string().max(LOCATION_MAX_LENGTH).optional().describe('Accepted and ignored'),
|
||||
}),
|
||||
EXPERIMENT,
|
||||
);
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
import {z} from 'zod';
|
||||
|
||||
const THREAD_MEMBERS_LIST_MAX_LIMIT = 100;
|
||||
const LOCATION_MAX_LENGTH = 100;
|
||||
|
||||
export const ThreadAutoArchiveDurationSchema = createInt32EnumType(
|
||||
[
|
||||
@@ -43,13 +42,10 @@ const ThreadRateLimitPerUserType = Int32Type.max(THREAD_RATE_LIMIT_PER_USER_MAX)
|
||||
'Seconds a user has to wait before sending another message (0-21600)',
|
||||
);
|
||||
|
||||
const LocationType = z.string().max(LOCATION_MAX_LENGTH).optional().describe('Accepted and ignored');
|
||||
|
||||
export const StartThreadFromMessageRequest = z.object({
|
||||
name: ThreadNameType,
|
||||
auto_archive_duration: ThreadAutoArchiveDurationSchema.optional(),
|
||||
rate_limit_per_user: ThreadRateLimitPerUserType.optional(),
|
||||
location: LocationType,
|
||||
});
|
||||
|
||||
export type StartThreadFromMessageRequest = z.infer<typeof StartThreadFromMessageRequest>;
|
||||
@@ -68,15 +64,10 @@ export const StartThreadRequest = z.object({
|
||||
auto_archive_duration: ThreadAutoArchiveDurationSchema.optional(),
|
||||
rate_limit_per_user: ThreadRateLimitPerUserType.optional(),
|
||||
invitable: z.boolean().optional().describe('Whether non-moderators can add other non-moderators (private threads)'),
|
||||
location: LocationType,
|
||||
});
|
||||
|
||||
export type StartThreadRequest = z.infer<typeof StartThreadRequest>;
|
||||
|
||||
export const ThreadLocationQuery = z.object({
|
||||
location: LocationType,
|
||||
});
|
||||
|
||||
export const ThreadMembersListQuery = z.object({
|
||||
with_member: QueryBooleanType.describe('Whether to include a guild member object for each thread member'),
|
||||
after: SnowflakeType.optional().describe('Get thread members after this user ID'),
|
||||
|
||||
Reference in new issue
Block a user