From cbe75c918e29feb6bca9f220445617460a08c1d0 Mon Sep 17 00:00:00 2001 From: Seyi Adebajo Date: Mon, 22 Jan 2018 16:09:38 -0800 Subject: [PATCH] adds reference to api interface as generic type arguments --- wherehows-web/app/authenticators/custom-ldap.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wherehows-web/app/authenticators/custom-ldap.ts b/wherehows-web/app/authenticators/custom-ldap.ts index b915f70626..646eb29a19 100644 --- a/wherehows-web/app/authenticators/custom-ldap.ts +++ b/wherehows-web/app/authenticators/custom-ldap.ts @@ -1,4 +1,5 @@ import Base from 'ember-simple-auth/authenticators/base'; +import { IAuthenticateResponse, IAuthenticationData } from 'wherehows-web/typings/api/authentication/user'; import { postJSON } from 'wherehows-web/utils/api/fetcher'; export default Base.extend({ @@ -9,8 +10,8 @@ export default Base.extend({ * @param {string} password matching candidate password for username * @return {Promise<{}>} */ - authenticate: async (username: string, password: string): Promise<{}> => { - const { data } = await postJSON<{ data: {} }>({ + authenticate: async (username: string, password: string): Promise => { + const { data } = await postJSON({ url: '/authenticate', data: { username, password } });