|
|
@@ -60,7 +60,7 @@ class Connection {
|
|
|
* @return {Promise<any>}
|
|
|
*/
|
|
|
public static getItem (url: string, id: number, progress: boolean = true): Promise<any> {
|
|
|
- const config:AxiosRequestConfig = {
|
|
|
+ const config: AxiosRequestConfig = {
|
|
|
url: `${url}/${id}`,
|
|
|
method: HTTP_METHOD.GET,
|
|
|
progress
|
|
|
@@ -75,7 +75,7 @@ class Connection {
|
|
|
* @return {Promise<any>}
|
|
|
*/
|
|
|
public static getCollection (url: string, progress: boolean = true): Promise<any> {
|
|
|
- const config:AxiosRequestConfig = {
|
|
|
+ const config: AxiosRequestConfig = {
|
|
|
url: `${url}`,
|
|
|
method: HTTP_METHOD.GET,
|
|
|
progress
|
|
|
@@ -92,7 +92,7 @@ class Connection {
|
|
|
* @return {Promise<any>}
|
|
|
*/
|
|
|
public static put (url: string, id: number, data: AnyJson, progress: boolean = true): Promise<any> {
|
|
|
- const config:AxiosRequestConfig = {
|
|
|
+ const config: AxiosRequestConfig = {
|
|
|
url: `${url}/${id}`,
|
|
|
method: HTTP_METHOD.PUT,
|
|
|
data,
|
|
|
@@ -109,7 +109,7 @@ class Connection {
|
|
|
* @return {Promise<any>}
|
|
|
*/
|
|
|
public static deleteItem (url: string, id: number, progress: boolean = true): Promise<any> {
|
|
|
- const config:AxiosRequestConfig = {
|
|
|
+ const config: AxiosRequestConfig = {
|
|
|
url: `${url}/${id}`,
|
|
|
method: HTTP_METHOD.DELETE,
|
|
|
progress
|
|
|
@@ -130,7 +130,7 @@ class Connection {
|
|
|
* Test si l'argument est bien de type DataPersister
|
|
|
* @param args
|
|
|
*/
|
|
|
- private static isDataPersisterArgs (args:DataProviderArgs|DataPersisterArgs): args is DataPersisterArgs {
|
|
|
+ private static isDataPersisterArgs (args: DataProviderArgs|DataPersisterArgs): args is DataPersisterArgs {
|
|
|
return (args as DataPersisterArgs).data !== undefined
|
|
|
}
|
|
|
}
|