initial commit

This commit is contained in:
2026-07-21 13:52:43 +07:00
commit f0e6f38940
881 changed files with 66309 additions and 0 deletions
@@ -0,0 +1,34 @@
using Indotalent.ConfigBackEnd.Interfaces;
using Indotalent.ConfigFrontEnd.Common;
using Indotalent.Features.Profile.PersonalInformation.Cqrs;
using Indotalent.Infrastructure.Authentication.Identity;
using Indotalent.Shared.Models;
using Microsoft.AspNetCore.Components;
using MudBlazor;
using RestSharp;
namespace Indotalent.Features.Profile.PersonalInformation;
public class PersonalInformationService : BaseService
{
private readonly RestClient _client;
public PersonalInformationService(IHttpClientFactory clientFactory, NavigationManager nav, ISnackbar snackbar, ICurrentUserService currentUserService, TokenProvider tokenProvider)
: base(clientFactory, nav, snackbar, currentUserService, tokenProvider)
{
_client = new RestClient(nav.BaseUri);
}
public async Task<ApiResponse<GetProfileByIdResponse>?> GetPersonalInformationByIdAsync(string id)
{
var request = new RestRequest($"api/personal-information/{id}", Method.Get);
return await ExecuteWithResponseAsync<GetProfileByIdResponse>(_client, request);
}
public async Task<ApiResponse<UpdateProfileResponse>?> UpdatePersonalInformationAsync(UpdateProfileRequest data)
{
var request = new RestRequest("api/personal-information/update", Method.Post);
request.AddJsonBody(data);
return await ExecuteWithResponseAsync<UpdateProfileResponse>(_client, request);
}
}