From f0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Mon, 19 Jul 2021 20:06:08 +0300 Subject: Apply Prettier --- app/services/api/api.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'app/services/api/api.ts') diff --git a/app/services/api/api.ts b/app/services/api/api.ts index 15f6815..4093d34 100644 --- a/app/services/api/api.ts +++ b/app/services/api/api.ts @@ -1,7 +1,7 @@ -import { ApisauceInstance, create, ApiResponse } from "apisauce" -import { getGeneralApiProblem } from "./api-problem" -import { ApiConfig, DEFAULT_API_CONFIG } from "./api-config" -import * as Types from "./api.types" +import { ApisauceInstance, create, ApiResponse } from 'apisauce' +import { getGeneralApiProblem } from './api-problem' +import { ApiConfig, DEFAULT_API_CONFIG } from './api-config' +import * as Types from './api.types' /** * Manages all requests to the API. @@ -39,7 +39,7 @@ export class Api { baseURL: this.config.url, timeout: this.config.timeout, headers: { - Accept: "application/json", + Accept: 'application/json', }, }) } @@ -68,9 +68,9 @@ export class Api { try { const rawUsers = response.data const resultUsers: Types.User[] = rawUsers.map(convertUser) - return { kind: "ok", users: resultUsers } + return { kind: 'ok', users: resultUsers } } catch { - return { kind: "bad-data" } + return { kind: 'bad-data' } } } @@ -94,9 +94,9 @@ export class Api { id: response.data.id, name: response.data.name, } - return { kind: "ok", user: resultUser } + return { kind: 'ok', user: resultUser } } catch { - return { kind: "bad-data" } + return { kind: 'bad-data' } } } } -- cgit v1.2.3