mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
imporve attendie and add video upload
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user