合入主线登录和营业时段策略,对齐旧界面与 React 访问流程
This commit is contained in:
commit
42395de23a
113 files changed
+1915
-558
No files matched your search
@@ -71,6 +71,7 @@ test('路由匹配器:重叠路径按声明顺序与参数约束区分', () =>
|
||||
// 由 git show 2b9cb82:新账系统/server.js 中全部 owner(actor) 调用整理:[方法, 示例地址]。
|
||||
const OWNER_ONLY = [
|
||||
['POST', '/api/shop-settings'],
|
||||
['POST', '/api/business-hours/setup'],
|
||||
['POST', '/api/printing'],
|
||||
['GET', '/api/employees'],
|
||||
['POST', '/api/employees'],
|
||||
@@ -130,7 +131,7 @@ test('路由声明字段合法', () => {
|
||||
const name = route.method + ' ' + route.path;
|
||||
assert.ok(['GET', 'POST'].includes(route.method), name);
|
||||
assert.equal(typeof route.handler, 'function', name);
|
||||
assert.ok([undefined, 'public', 'user'].includes(route.auth), name);
|
||||
assert.ok([undefined, 'public', 'user', 'session'].includes(route.auth), name);
|
||||
assert.ok([undefined, 'owner'].includes(route.role), name);
|
||||
if (route.write) assert.equal(route.method, 'POST', name);
|
||||
if (route.direct) assert.ok(!route.write, name);
|
||||
|
||||
Reference in new issue
Block a user