create user if not exist

This commit is contained in:
hatim 2023-05-15 15:26:34 +02:00
parent 102b2f70b8
commit e3c32a5650

View file

@ -120,7 +120,7 @@ export default class {
async SendAppUserToAppUserPayment(appId: string, req: Types.SendAppUserToAppUserPaymentRequest): Promise<void> {
const fromUser = await this.storage.applicationStorage.GetApplicationUser(appId, req.from_user_identifier)
const toUser = await this.storage.applicationStorage.GetApplicationUser(appId, req.to_user_identifier)
const toUser = await this.storage.applicationStorage.GetOrCreateApplicationUser(appId, req.to_user_identifier, 0)
const app = await this.storage.applicationStorage.GetApplication(appId)
await this.paymentManager.SendUserToUserPayment(fromUser.user.user_id, toUser.user.user_id, req.amount, app)
}