implemented images maintenance, services + component
This commit is contained in:
1 parent
ba96f540ca
commit
34766ba8e9
13 files changed
+448
-4
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { environment } from '../../../environments/environment.prod';
|
||||
import { MaintenanceResult } from '../../shared/models/maintenanceResult.model';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class MaintenanceService {
|
||||
private backend_apiUrl = environment.API_URL;
|
||||
private apiAction = 'maintenance';
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
getOrphanFiles() {
|
||||
return this.http.get<MaintenanceResult>(
|
||||
`${this.backend_apiUrl}/${this.apiAction}/orphan-files`
|
||||
);
|
||||
}
|
||||
|
||||
getMissingFiles() {
|
||||
return this.http.get<MaintenanceResult>(
|
||||
`${this.backend_apiUrl}/${this.apiAction}/missing-files`
|
||||
);
|
||||
}
|
||||
|
||||
deleteOrphanFiles() {
|
||||
return this.http.delete<MaintenanceResult>(
|
||||
`${this.backend_apiUrl}/${this.apiAction}/orphan-files`
|
||||
);
|
||||
}
|
||||
|
||||
deleteMissingFiles() {
|
||||
return this.http.delete<MaintenanceResult>(
|
||||
`${this.backend_apiUrl}/${this.apiAction}/missing-files`
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user