Skip to content
Snippets Groups Projects
createShift.ts 345 B
Newer Older
import axios from 'axios';
import { DriverShiftType } from 'types/DriverShiftType';

/**
 * @async
 * Create a driver shift in the server.
 * @param {DriverShiftType} values of the shift.
 * @returns {Promise<void>} void.
 */
export const createShift = async (values: DriverShiftType): Promise<void> =>
  axios.post('/api/web/shifts/', values);