Implementa integrações de repositórios

This commit is contained in:
2026-05-11 12:45:46 -03:00
parent bcee06b908
commit 307ad9431b
6 changed files with 152 additions and 38 deletions

View File

@@ -33,10 +33,9 @@ export const userRepository = {
},
async getById(userId) {
const response = await fetch(`${apiConfig.functionsUrl}/user-info-by-id`, {
const response = await fetch(`${apiConfig.functionsUrl}/user-info-by-id/${encodeURIComponent(userId)}`, {
method: 'POST',
headers: getAuthenticatedHeaders(),
body: JSON.stringify({ user_id: userId }),
})
if (!response.ok) {
@@ -83,7 +82,7 @@ export const userRepository = {
const response = await fetch(`${apiConfig.functionsUrl}/delete-user`, {
method: 'POST',
headers: getAuthenticatedHeaders(),
body: JSON.stringify({ user_id: userId }),
body: JSON.stringify({ userId, user_id: userId }),
})
if (!response.ok) {