return locked entity on lockEntity and bug

pull/14/head
leonnicolas 4 years ago
parent 5a52f592cb
commit 47d71ea827
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -78,7 +78,7 @@ export class ContactInformationAPI extends DataSource {
.select()
.skip(offset)
.take(limit)
.execute();
.getMany();
}
async personById (id: number) {

@ -83,11 +83,8 @@ export class LockUtils {
})
.where('id = :id', { id: id })
.execute();
return await this.findById(connection, target, alias, id);
} else {
// lock was set
throw new GraphQLError('Entry locked by other user');
}
return await this.findById(connection, target, alias, id);
}
static async unlockEntity (connection: Connection, target: ObjectType<Lockable>, alias: string, id: number, userId: number): Promise<boolean> {

Loading…
Cancel
Save