fix: change version name
This commit is contained in:
13
src/routes/app-manager/admin/mv-user-app.ts
Normal file
13
src/routes/app-manager/admin/mv-user-app.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { app } from '@/app.ts';
|
||||
import { AppModel, AppListModel } from '../module/index.ts';
|
||||
export const mvAppFromUserAToUserB = async (userA: string, userB: string) => {
|
||||
const appList = await AppModel.findAll({
|
||||
where: {
|
||||
user: userA,
|
||||
},
|
||||
});
|
||||
for (const app of appList) {
|
||||
app.user = userB;
|
||||
await app.save();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user