update partey timeslots + minetest
This commit is contained in:
@@ -12,7 +12,22 @@ export class JitsiService {
|
||||
}
|
||||
|
||||
get(page: number, size: number, sort: string, desc: boolean) {
|
||||
const httpParams = new HttpParams().set("page", "" + page).set("size", "" + size).set("sort", sort).set("desc", "" + desc);
|
||||
let httpParams = new HttpParams();
|
||||
if(page != undefined) {
|
||||
httpParams = httpParams.set("page", "" + page);
|
||||
}
|
||||
if(size != undefined) {
|
||||
httpParams = httpParams.set("size", "" + size);
|
||||
}
|
||||
|
||||
if(sort != undefined) {
|
||||
httpParams = httpParams.set("sort", sort);
|
||||
}
|
||||
|
||||
if(desc != undefined) {
|
||||
httpParams = httpParams.set("desc", "" + desc);
|
||||
}
|
||||
|
||||
return this.http.get(environment.apiUrl + "/jitsi/rooms", {params: httpParams});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||
|
||||
import {environment} from '../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class MinetestAccountsService {
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
get() {
|
||||
return this.http.get(environment.apiUrl + "/minetest/accounts");
|
||||
}
|
||||
|
||||
create(minetestAccount) {
|
||||
return this.http.post(environment.apiUrl + "/minetest/accounts", minetestAccount);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||
|
||||
import {environment} from '../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ParteyTimeslotsService {
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
get(page: number, size: number, sort: string, desc: boolean, filter : any) {
|
||||
let httpParams = new HttpParams();
|
||||
if(page != undefined) {
|
||||
httpParams = httpParams.set("page", "" + page);
|
||||
}
|
||||
if(size != undefined) {
|
||||
httpParams = httpParams.set("size", "" + size);
|
||||
}
|
||||
|
||||
if(sort != undefined) {
|
||||
httpParams = httpParams.set("sort", sort);
|
||||
}
|
||||
|
||||
if(desc != undefined) {
|
||||
httpParams = httpParams.set("desc", "" + desc);
|
||||
}
|
||||
|
||||
if (filter) {
|
||||
if(filter.owner != undefined && filter.owner != "") {
|
||||
httpParams = httpParams.set("owner", "" + filter.owner);
|
||||
}
|
||||
if(filter.after != undefined && filter.after != "") {
|
||||
httpParams = httpParams.set("after", "" + filter.after);
|
||||
}
|
||||
if(filter.type != undefined && filter.type != "") {
|
||||
httpParams = httpParams.set("type", "" + filter.type);
|
||||
}
|
||||
if(filter.visibility != undefined && filter.visibility != "") {
|
||||
httpParams = httpParams.set("visibility", "" + filter.visibility);
|
||||
}
|
||||
if(filter.search != undefined && filter.search != "") {
|
||||
httpParams = httpParams.set("search", "" + filter.search);
|
||||
}
|
||||
}
|
||||
|
||||
return this.http.get(environment.apiUrl + "/partey/timeslots", {params: httpParams});
|
||||
}
|
||||
|
||||
|
||||
quota() {
|
||||
return this.http.get(environment.apiUrl + "/partey/timeslots/quota");
|
||||
}
|
||||
|
||||
create(timeslot) {
|
||||
return this.http.post(environment.apiUrl + "/partey/timeslots", timeslot);
|
||||
}
|
||||
|
||||
update(timeslot) {
|
||||
return this.http.patch(environment.apiUrl + "/partey/timeslots", timeslot);
|
||||
}
|
||||
|
||||
delete(id) {
|
||||
return this.http.delete(environment.apiUrl + "/partey/timeslots/" + id);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user