fix: use PUT instead of PATCH for language preference update

pull/97/head
Juan Manuel Bardallo 2026-07-08 14:13:31 +02:00
parent 5bc7527ce7
commit ee05f6a2cd
1 changed files with 2 additions and 3 deletions

View File

@ -79,10 +79,9 @@ export class HeaderComponent implements OnInit {
// Persistir en servidor si el usuario está autenticado
const uuid = this.auth.uuid;
if (uuid) {
this.http.patch(
this.http.put(
`${this.config.apiUrl}/users/${uuid}`,
{ language: lang },
{ headers: { 'Content-Type': 'application/merge-patch+json' } }
{ language: lang }
).subscribe({
error: (err) => console.error('Error saving language preference:', err)
});