mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:24:56 -06:00
21 lines
439 B
JavaScript
21 lines
439 B
JavaScript
// @flow
|
|
import type { Quantity } from '../constants/QuantityConstants';
|
|
import type { QuantityResponse } from '../constants/QuantityConstants';
|
|
import { fetchRequest } from './FetchApi';
|
|
|
|
export const setQuantity = ({
|
|
productId,
|
|
quantity,
|
|
}: {
|
|
productId: string,
|
|
quantity: Quantity,
|
|
}): Promise<QuantityResponse> => {
|
|
return fetchRequest({
|
|
method: 'POST',
|
|
endpoint: '/quantity',
|
|
body: {
|
|
productId,
|
|
quantity,
|
|
},
|
|
});
|
|
};
|