models enums services

This commit is contained in:
Tizian.Breuch
2025-09-29 16:21:16 +02:00
parent 991d57d183
commit fbca5558ec
33 changed files with 671 additions and 31 deletions

View File

@@ -0,0 +1,20 @@
import { Injectable, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { API_URL } from '../../core/tokens/api-url.token';
import { AdminShopInfo } from '../../core/models/shop.model';
@Injectable({ providedIn: 'root' })
export class ShopInfoService {
private http = inject(HttpClient);
private apiUrl = inject(API_URL);
private readonly endpoint = '/AdminShopInfo';
get(): Observable<AdminShopInfo> {
return this.http.get<AdminShopInfo>(`${this.apiUrl}${this.endpoint}`);
}
update(data: AdminShopInfo): Observable<void> {
return this.http.put<void>(`${this.apiUrl}${this.endpoint}`, data);
}
}