feat(mindspace): gate published page delivery
This commit is contained in:
@@ -2131,6 +2131,10 @@ export async function listNotifications(status = 'unread', limit = 20): Promise<
|
||||
if (status && status !== 'all') params.set('status', status);
|
||||
params.set('limit', String(limit));
|
||||
const response = await fetch(`/auth/notifications?${params}`);
|
||||
if (response.status === 401) {
|
||||
notifyUnauthorized();
|
||||
throw new ApiError(401, '未授权,请重新登录');
|
||||
}
|
||||
if (!response.ok) {
|
||||
throw new ApiError(response.status, '读取通知失败');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user