mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
update image
This commit is contained in:
@@ -28,14 +28,14 @@ const OwnerSchema = z.object({
|
||||
wxUserId: z.number(),
|
||||
wxFullName: z.string(),
|
||||
wxeMail: z.string(),
|
||||
userPhoto: z.string(),
|
||||
userPhoto: z.string().nullable(),
|
||||
});
|
||||
|
||||
const OrganizerSchema = z.object({
|
||||
wxUserId: z.number(),
|
||||
wxFullName: z.string(),
|
||||
wxeMail: z.string(),
|
||||
userPhoto: z.string(),
|
||||
userPhoto: z.string().nullable(),
|
||||
});
|
||||
|
||||
const EventRecurrenceSchema = z.object({
|
||||
|
||||
@@ -5,7 +5,7 @@ const OwnerSchema = z.object({
|
||||
wxUserId: z.number(),
|
||||
wxFullName: z.string(),
|
||||
wxeMail: z.string(),
|
||||
userPhoto: z.string(),
|
||||
userPhoto: z.string().nullable(),
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ const OwnerSchema = z.object({
|
||||
wxUserId: z.number(),
|
||||
wxFullName: z.string(),
|
||||
wxeMail: z.string(),
|
||||
userPhoto: z.string(),
|
||||
userPhoto: z.string().nullable(),
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { HttpAdapter } from 'src/app/infra/http/adapter';
|
||||
import { IUserRepositoryLoginParams, UserRefreshTokenInputDTO } from 'src/app/core/user/repository/user-remote-repository';
|
||||
import { UserLoginOutput } from 'src/app/core/user/use-case/user-login-use-case.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { UserGetByIdOutput } from 'src/app/core/user/use-case/user-get-by-id.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -38,14 +39,8 @@ export class UserRemoteRepositoryService {
|
||||
return await this.http.post<UserLoginOutput>(`${this.baseUrl}/Users/RefreshToken`, input)
|
||||
}
|
||||
|
||||
getUserProfilePhoto(guid: string, tracing?: TracingType) {
|
||||
const geturl = environment.apiURL + 'UserAuthentication/GetPhoto';
|
||||
|
||||
const params = {
|
||||
UserPhoto: guid
|
||||
}
|
||||
|
||||
return this.httpService.get<string>(`${geturl}`, params, tracing);
|
||||
async getUserProfilePhoto(guid: string, tracing?: TracingType) {
|
||||
return await this.http.get<UserGetByIdOutput>(`${this.baseUrl}/Users/${SessionStore.user.UserId}`, {})
|
||||
}
|
||||
|
||||
addUserProfilePhoto(data: IProfilePictureInputDTO) {
|
||||
|
||||
@@ -18,7 +18,7 @@ export class UserRepositoryService {
|
||||
const result = await this.remote.getUserProfilePhoto(guid, tracing)
|
||||
|
||||
if(result.isOk()) {
|
||||
this.local.addProfilePicture({base64: 'data:image/jpeg;base64,' + result.value})
|
||||
this.local.addProfilePicture({base64: result.value.data.data.userPhoto})
|
||||
} else {
|
||||
tracing?.setAttribute("picture.upload", "false")
|
||||
tracing?.hasError("cant upload picture")
|
||||
|
||||
Reference in New Issue
Block a user