refactor: Upgrade typeorm to 0.3.x (#5151)
This commit is contained in:
committed by
GitHub
parent
6608e69457
commit
0a5ab560b1
@@ -99,11 +99,14 @@ e2eController.post('/db/setup-owner', bodyParser.json(), async (req, res) => {
|
||||
}
|
||||
|
||||
const globalRole = await Db.collections.Role.findOneOrFail({
|
||||
name: 'owner',
|
||||
scope: 'global',
|
||||
select: ['id'],
|
||||
where: {
|
||||
name: 'owner',
|
||||
scope: 'global',
|
||||
},
|
||||
});
|
||||
|
||||
const owner = await Db.collections.User.findOneOrFail({ globalRole });
|
||||
const owner = await Db.collections.User.findOneByOrFail({ globalRoleId: globalRole.id });
|
||||
|
||||
await Db.collections.User.update(owner.id, {
|
||||
email: req.body.email,
|
||||
|
||||
Reference in New Issue
Block a user