fix issues

This commit is contained in:
Peter Maquiran
2024-12-05 19:14:11 +01:00
parent dad392335e
commit 5a1bbe6103
46 changed files with 378 additions and 1748 deletions
@@ -0,0 +1,34 @@
import { Injectable } from '@angular/core';
import { z } from 'zod';
import { IUserRemoteRepository } from '../repository/user-remote-repository';
import { SessionStore } from 'src/app/store/session.service';
import { Platform } from '@ionic/angular';
import { XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
@Injectable({
providedIn: 'root'
})
export class UserRefreshTokenService {
constructor(
private userRemoteRepository: IUserRemoteRepository,
private platform: Platform
) { }
@XTracerAsync({name:'UserRefreshTokenService', module:'user', bugPrint: true})
async execute() {
let channelId;
if ( this.platform.is('desktop') || this.platform.is("mobileweb")){
channelId = 2
} else {
channelId = 1
}
return await this.userRemoteRepository.refreshToken({
authorization: SessionStore.user.Authorization,
refreshToken: SessionStore.user.RefreshToken,
channelId
})
}
}