imporve attendie and add video upload

This commit is contained in:
Peter Maquiran
2024-01-06 20:37:49 +01:00
parent 15e9b312e3
commit eb790266f1
21 changed files with 657 additions and 165 deletions
@@ -3,7 +3,7 @@ import { environment } from 'src/environments/environment';
import { HttpServiceService } from 'src/app/services/http/http-service.service';
import { Observable} from 'rxjs';
import { CreateEvent, EditEvent, EventDetailsDTO, EventsDTO, refreshTokenDTO } from "./interface";
import { HttpParams } from '@angular/common/http';
import { HttpHeaders, HttpParams } from '@angular/common/http';
import { DetectCalendars, makeHeaderForCalendar } from '../../utils/utils';
import { z } from "zod";
import { ok, err } from 'neverthrow';
@@ -18,14 +18,16 @@ export class MiddlewareServiceService {
constructor(
private HttpServiceService: HttpServiceService,
) {}
) {
window["MiddlewareServiceService"] = this
}
refreshToken(refreshToken: string): Observable<refreshTokenDTO> {
refreshToken(refreshToken: string){
const data = {
refreshToken: refreshToken
}
return this.HttpServiceService.put(environment.apiURL + "UserAuthentication/RefreshToken", data, {})
return this.HttpServiceService.put<refreshTokenDTO>(environment.apiURL + "UserAuthentication/RefreshToken", data, {})
// .pipe(
// map((response: HttpResponse<refreshToken>) => {
// return response.body
@@ -134,4 +136,22 @@ export class MiddlewareServiceService {
}
// ================================ Acções =================================================
// ========== LKFRT
uploadFileLK(formData: FormData) {
const headers = new HttpHeaders();
headers.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
//const geturl = environment.apiURL + 'Tasks/DelegateTask';
const geturl = environment.apiURL + 'ObjectServer/UploadFiles';
let options = {
headers: headers
};
return this.HttpServiceService.post(`${geturl}`, formData, options);
}
}