Skip to content

Commit

Permalink
feat(getProducts): apply Flow's strict typing
Browse files Browse the repository at this point in the history
  • Loading branch information
aneurysmjs committed May 25, 2019
1 parent 1b9fd1f commit 6018e9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/store/actions/getProducts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

import { api } from '@/api';

import type { ProductsType } from '@/store/types/ProductsType';

import * as types from '../ActionTypes';

export default function getCountries(query: string = '') {
export default function getProducts(query: string = '') {

return {
types: [
types.GET_PRODUCTS_REQUEST,
types.GET_PRODUCTS_SUCCESS,
types.GET_PRODUCTS_FAILURE
],
callAPI: () => api.get(query),
callAPI: () => api.get<string, ProductsType>(query),
};

}

0 comments on commit 6018e9d

Please sign in to comment.