mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-03 22:23:37 +00:00
adds reference to api interface as generic type arguments
This commit is contained in:
parent
5bca5a0550
commit
cbe75c918e
@ -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<IAuthenticationData> => {
|
||||
const { data } = await postJSON<IAuthenticateResponse>({
|
||||
url: '/authenticate',
|
||||
data: { username, password }
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user