fix(notification): align audit route and WPUSH fixtures

This commit is contained in:
whyour
2026-10-12 01:13:53 +08:00
parent 1503f07c75
commit 7334566d3c
2 changed files with 14 additions and 3 deletions
+12 -1
View File
@@ -12,6 +12,12 @@ export interface OpenOperation {
anonymous?: boolean; anonymous?: boolean;
} }
export const openOperations: readonly OpenOperation[] = [ export const openOperations: readonly OpenOperation[] = [
{
name: 'system notification-logs',
method: 'GET',
path: 'system/notify-log',
},
{ name: 'task view-list', method: 'GET', path: 'crons/views' }, { name: 'task view-list', method: 'GET', path: 'crons/views' },
{ {
name: 'task view-create', name: 'task view-create',
@@ -478,7 +484,12 @@ export const openOperations: readonly OpenOperation[] = [
path: 'system/config/dependence-clean', path: 'system/config/dependence-clean',
body: 'json', body: 'json',
}, },
{ name: 'dashboard record', method: 'POST', path: 'dashboard/record', body: 'json' }, {
name: 'dashboard record',
method: 'POST',
path: 'dashboard/record',
body: 'json',
},
{ name: 'dashboard overview', method: 'GET', path: 'dashboard/overview' }, { name: 'dashboard overview', method: 'GET', path: 'dashboard/overview' },
{ name: 'dashboard trend', method: 'GET', path: 'dashboard/trend' }, { name: 'dashboard trend', method: 'GET', path: 'dashboard/trend' },
{ name: 'dashboard top-time', method: 'GET', path: 'dashboard/top-time' }, { name: 'dashboard top-time', method: 'GET', path: 'dashboard/top-time' },
+2 -2
View File
@@ -64,7 +64,7 @@ test('decoded SystemNotify requests reach WPUSH with explicit or saved configura
'../config/const': constants, '../config/const': constants,
'../config/util': {}, '../config/util': {},
'../data/dependence': {}, '../data/dependence': {},
'../data/system': {}, '../data/system': { AuthDataType: { notifyLog: 'notifyLog' }, NotifyStatus: { success: 0, fail: 1 }, SystemModel: { create: async () => {}, findAll: async () => [] } },
'../shared/pLimit': {}, '../shared/pLimit': {},
'../schedule/client': {}, '../schedule/client': {},
'../shared/i18n': { t: (x) => x }, '../shared/i18n': { t: (x) => x },
@@ -79,7 +79,7 @@ test('decoded SystemNotify requests reach WPUSH with explicit or saved configura
wpushApiKey: 'saved-key', wpushApiKey: 'saved-key',
}), }),
}; };
const system = new SystemService(); const system = new SystemService({ error() {} });
system.notificationService = notification; system.notificationService = notification;
for (const info of [ for (const info of [