feat: update org operate
This commit is contained in:
21
src/scripts/container.ts
Normal file
21
src/scripts/container.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { ContainerModel } from '../routes/container/models/index.ts';
|
||||
|
||||
const main = async () => {
|
||||
// await ContainerModel.update(
|
||||
// {
|
||||
// type: 'render-js',
|
||||
// },
|
||||
// {
|
||||
// where: {
|
||||
// type: '',
|
||||
// },
|
||||
// },
|
||||
// );
|
||||
const containers = await ContainerModel.findAll();
|
||||
for (const container of containers) {
|
||||
console.log(container.id, container.type);
|
||||
}
|
||||
process.exit(0);
|
||||
};
|
||||
|
||||
main();
|
||||
@@ -4,6 +4,9 @@ import { User } from '../models/user.ts';
|
||||
// console.log('sync user done');
|
||||
// });
|
||||
|
||||
User.findOne({ where: { username: 'admin' } }).then((user) => {
|
||||
console.log('user', user);
|
||||
});
|
||||
// class UserChange extends User {
|
||||
// static async syncUser() {
|
||||
// await UserChange.sync({ alter: true, logging: false });
|
||||
// console.log('sync user done');
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user