add invites
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
|
||||
import {environment} from '../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class InviteService {
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
get(quota: string) {
|
||||
return this.http.get(environment.apiUrl + "/invites" + (quota ? "?quota=" + quota : ""));
|
||||
}
|
||||
|
||||
|
||||
getOthers(quota: string) {
|
||||
return this.http.get(environment.apiUrl + "/invites/" + quota + "/others");
|
||||
}
|
||||
|
||||
getOthersPages(quota: string, page : number, size : number, search : string) {
|
||||
return this.http.get(environment.apiUrl + "/invites/" + quota + "/others?page=" + page + "&size=" + size + "&search=" + search);
|
||||
}
|
||||
|
||||
create(quota: string, invite: any) {
|
||||
return this.http.post(environment.apiUrl + "/invites/" + quota, invite);
|
||||
}
|
||||
|
||||
update(invite: any) {
|
||||
return this.http.post(environment.apiUrl + "/invites", invite);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user