first commit

This commit is contained in:
jerryjzhang
2023-06-12 18:44:01 +08:00
commit dc4fc69b57
879 changed files with 573090 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { ROUTE_AUTH_CODES } from '../config/routes';
export default function access({ authCodes }: { authCodes: string[] }) {
return Object.keys(ROUTE_AUTH_CODES).reduce((result, key) => {
const data = { ...result };
const code = ROUTE_AUTH_CODES[key];
const codes = authCodes || [];
data[code] = codes.includes(code);
return data;
}, {});
}