feat: add UserSecret
This commit is contained in:
3
src/scripts/common-redis.ts
Normal file
3
src/scripts/common-redis.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as redisLib from '../modules/redis.ts';
|
||||
import { useContextKey, useContext } from '@kevisual/use-config/context';
|
||||
export const redis = useContextKey('redis', () => redisLib.redis);
|
||||
@@ -1,7 +1,8 @@
|
||||
import { config } from '../modules/config.ts';
|
||||
import { sequelize } from '../modules/sequelize.ts';
|
||||
export { program, Command } from '../program.ts';
|
||||
import { User, UserInit, OrgInit, Org } from '@kevisual/code-center-module/models';
|
||||
// import { User, UserInit, OrgInit, Org, UserSecretInit, UserSecret } from '@kevisual/code-center-module/models';
|
||||
import { User, UserInit, OrgInit, Org, UserSecretInit, UserSecret } from '@kevisual/code-center-module/src/core-models.ts';
|
||||
import { Logger } from '@kevisual/logger';
|
||||
export const close = async () => {
|
||||
process.exit(0);
|
||||
@@ -22,8 +23,13 @@ export const initUser = async () => {
|
||||
alter: true,
|
||||
logging: false,
|
||||
});
|
||||
await UserSecretInit(sequelize, undefined, {
|
||||
alter: true,
|
||||
logging: false,
|
||||
});
|
||||
return {
|
||||
User: User,
|
||||
Org: Org,
|
||||
UserSecret: UserSecret,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user