Fix sur les ajouts d'infos
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Injectable } from "@angular/core";
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { AircraftResp, AircraftReq } from '../models/aircraft';
|
||||
|
||||
import { BaseService } from './base.service';
|
||||
import { AircraftResp, AircraftReq } from "../models/aircraft";
|
||||
|
||||
import { BaseService } from "./base.service";
|
||||
|
||||
@Injectable()
|
||||
export class AircraftService extends BaseService {
|
||||
@@ -14,10 +13,9 @@ export class AircraftService extends BaseService {
|
||||
}
|
||||
|
||||
public getListOfAircrafts(): Observable<Array<AircraftResp>> {
|
||||
return this.http.get<Array<AircraftResp>>(
|
||||
`${this.apiUrl}/Aircraft`,
|
||||
{ headers: this.headers }
|
||||
);
|
||||
return this.http.get<Array<AircraftResp>>(`${this.apiUrl}/Aircraft`, {
|
||||
headers: this.headers
|
||||
});
|
||||
}
|
||||
|
||||
public AddAircraft(aircraftName: string) {
|
||||
@@ -32,5 +30,4 @@ export class AircraftService extends BaseService {
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { Injectable } from "@angular/core";
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
import { map } from "rxjs/operators";
|
||||
|
||||
import { DropZoneResp } from '../models/dropzone';
|
||||
|
||||
import { BaseService } from './base.service';
|
||||
import { DropZoneResp, DropZoneReq } from "../models/dropzone";
|
||||
|
||||
import { BaseService } from "./base.service";
|
||||
|
||||
@Injectable()
|
||||
export class DropzoneService extends BaseService {
|
||||
@@ -48,4 +47,33 @@ export class DropzoneService extends BaseService {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public AddDropZone(
|
||||
latitude: string,
|
||||
longitude: string,
|
||||
name: string,
|
||||
address: string,
|
||||
website: string,
|
||||
email: string,
|
||||
type: Array<string>,
|
||||
isFavorite: boolean
|
||||
) {
|
||||
const bodyNewDropZone: DropZoneReq = {
|
||||
id: 0,
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
name: name,
|
||||
address: address,
|
||||
website: website,
|
||||
email: email,
|
||||
type: type,
|
||||
isFavorite: isFavorite
|
||||
};
|
||||
|
||||
this.http
|
||||
.post(`${this.apiUrl}/DropZone`, bodyNewDropZone, {
|
||||
headers: this.headers
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Injectable } from "@angular/core";
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { GearResp, GearReq } from '../models/gear';
|
||||
|
||||
import { BaseService } from './base.service';
|
||||
import { GearResp, GearReq } from "../models/gear";
|
||||
|
||||
import { BaseService } from "./base.service";
|
||||
|
||||
@Injectable()
|
||||
export class GearService extends BaseService {
|
||||
@@ -19,13 +18,15 @@ export class GearService extends BaseService {
|
||||
});
|
||||
}
|
||||
|
||||
public AddGear(name: string,
|
||||
public AddGear(
|
||||
name: string,
|
||||
manufacturer: string,
|
||||
minSize: number,
|
||||
maxSize: number,
|
||||
aad: string,
|
||||
mainCanopy: string,
|
||||
reserveCanopy: string) {
|
||||
reserveCanopy: string
|
||||
) {
|
||||
const bodyNewGear: GearReq = {
|
||||
id: 0,
|
||||
name: name,
|
||||
@@ -43,5 +44,4 @@ export class GearService extends BaseService {
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Injectable } from "@angular/core";
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { JumpTypeResp } from '../models/jumpType';
|
||||
|
||||
import { BaseService } from './base.service';
|
||||
import { JumpTypeResp, JumpTypeReq } from "../models/jumpType";
|
||||
|
||||
import { BaseService } from "./base.service";
|
||||
|
||||
@Injectable()
|
||||
export class JumpTypeService extends BaseService {
|
||||
@@ -14,9 +13,21 @@ export class JumpTypeService extends BaseService {
|
||||
}
|
||||
|
||||
public getListOfJumpTypes(): Observable<Array<JumpTypeResp>> {
|
||||
return this.http.get<Array<JumpTypeResp>>(
|
||||
`${this.apiUrl}/JumpType`,
|
||||
{ headers: this.headers }
|
||||
);
|
||||
return this.http.get<Array<JumpTypeResp>>(`${this.apiUrl}/JumpType`, {
|
||||
headers: this.headers
|
||||
});
|
||||
}
|
||||
|
||||
public AddJumpType(jumptypetName: string) {
|
||||
const bodyJumpType: JumpTypeReq = {
|
||||
id: 0,
|
||||
name: jumptypetName
|
||||
};
|
||||
|
||||
this.http
|
||||
.post(`${this.apiUrl}/JumpType`, bodyJumpType, {
|
||||
headers: this.headers
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user