mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 13:35:42 +09:00
fix(app,api): kick reasons, blocked counts and locale fallbacks (#3334)
This commit is contained in:
1 parent
a5c1362f4a
commit
4db13b0375
157 files changed
+3080
-1995
No files matched your search
@@ -15,6 +15,7 @@ import {MessageListResponse} from '@fluxer/schema/src/domains/message/MessageRes
|
||||
import {
|
||||
HarvestArchiveResponse,
|
||||
HarvestCreationResponseSchema,
|
||||
HarvestDownloadQuery,
|
||||
HarvestDownloadUrlResponse,
|
||||
HarvestStatusResponseSchema,
|
||||
HarvestStatusResponseSchemaNullable,
|
||||
@@ -282,6 +283,9 @@ export function UserContentController(app: HonoApp) {
|
||||
'/harvest-downloads/:harvestId',
|
||||
RateLimitMiddleware(RateLimitConfigs.USER_HARVEST_DOWNLOAD_FILE),
|
||||
Validator('param', HarvestIdParam),
|
||||
Validator('query', HarvestDownloadQuery, (result, ctx) =>
|
||||
result.success ? undefined : ctx.text('Not Found', 404),
|
||||
),
|
||||
OpenAPI({
|
||||
operationId: 'download_data_harvest_archive',
|
||||
summary: 'Download data harvest archive',
|
||||
@@ -295,10 +299,7 @@ export function UserContentController(app: HonoApp) {
|
||||
}),
|
||||
async (ctx) => {
|
||||
const {harvestId} = ctx.req.valid('param');
|
||||
const token = ctx.req.query('token');
|
||||
if (!token) {
|
||||
return ctx.text('Not Found', 404);
|
||||
}
|
||||
const {token} = ctx.req.valid('query');
|
||||
try {
|
||||
const result = await ctx.get('userContentRequestService').streamHarvestDownload({
|
||||
harvestId,
|
||||
|
||||
Reference in new issue
Block a user