This commit is contained in:
Lurkars
2021-03-11 19:52:37 +01:00
parent cf46cf6fd0
commit c4321d99cb
41 changed files with 1389 additions and 471 deletions
+33
View File
@@ -0,0 +1,33 @@
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root',
})
export class ProfileService {
constructor(private http: HttpClient) {
}
getAll() {
return this.http.get(environment.apiUrl + "/profiles");
}
getAllForUser(username) {
return this.http.get(environment.apiUrl + "/profiles/" + username);
}
getForUser(username, name) {
return this.http.get(environment.apiUrl + "/profiles/" + username + "/" + name);
}
createOrUpdate(profileModel) {
return this.http.post(environment.apiUrl + "/profiles", profileModel);
}
delete(name) {
return this.http.delete(environment.apiUrl + "/profiles/" + name);
}
}