download/list、download/count、download/category/list 在后端位于 requireLogin 内, 前端却以 auth: false 请求,未携带 token 导致 401,已登录用户也被提示未登录。
This commit is contained in:
1 parent
30fbf5e5a6
commit
fdfc2d36f5
1 file changed
+3
-7
@@ -556,22 +556,18 @@ export function skinSitePublicDownloadList(options?: {
|
||||
offset: String(options?.offset ?? 0),
|
||||
})
|
||||
if (options?.category) query.set('category', options.category)
|
||||
return skinSiteRequest<SkinSitePublicDownloadItem[]>(`download/list?${query.toString()}`, {
|
||||
auth: false,
|
||||
})
|
||||
return skinSiteRequest<SkinSitePublicDownloadItem[]>(`download/list?${query.toString()}`)
|
||||
}
|
||||
|
||||
export function skinSitePublicDownloadCount(category?: string): Promise<SkinSiteResponse<number>> {
|
||||
const suffix = category ? `?category=${encodeURIComponent(category)}` : ''
|
||||
return skinSiteRequest<number>(`download/count${suffix}`, { auth: false })
|
||||
return skinSiteRequest<number>(`download/count${suffix}`)
|
||||
}
|
||||
|
||||
export function skinSitePublicDownloadCategories(): Promise<
|
||||
SkinSiteResponse<SkinSitePublicDownloadCategory[]>
|
||||
> {
|
||||
return skinSiteRequest<SkinSitePublicDownloadCategory[]>('download/category/list', {
|
||||
auth: false,
|
||||
})
|
||||
return skinSiteRequest<SkinSitePublicDownloadCategory[]>('download/category/list')
|
||||
}
|
||||
// ---------------------------------------------------------------------------
|
||||
// Maps
|
||||
|
||||
Reference in new issue
Block a user