check app id
This commit is contained in:
parent
a8c30afcdd
commit
bd59488e42
1 changed files with 2 additions and 2 deletions
|
|
@ -94,7 +94,7 @@ export default class {
|
||||||
if (!nostrPub) {
|
if (!nostrPub) {
|
||||||
throw new Error("no nostrPub provided")
|
throw new Error("no nostrPub provided")
|
||||||
}
|
}
|
||||||
const user = await entityManager.getRepository(ApplicationUser).findOne({ where: { nostr_public_key: nostrPub } })
|
const user = await entityManager.getRepository(ApplicationUser).findOne({ where: { nostr_public_key: nostrPub, application: { app_id: application.app_id } } })
|
||||||
if (user) {
|
if (user) {
|
||||||
return user
|
return user
|
||||||
}
|
}
|
||||||
|
|
@ -157,7 +157,7 @@ export default class {
|
||||||
|
|
||||||
async AddNPubToApplicationUser(serialId: number, nPub: string, entityManager = this.DB) {
|
async AddNPubToApplicationUser(serialId: number, nPub: string, entityManager = this.DB) {
|
||||||
return entityManager.getRepository(ApplicationUser).update(serialId, { nostr_public_key: nPub })
|
return entityManager.getRepository(ApplicationUser).update(serialId, { nostr_public_key: nPub })
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue