working page pagination controls
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
import { post } from "./baseApi";
|
||||
import { get, post } from "./baseApi";
|
||||
|
||||
export function createCShifts(postBodies) {
|
||||
const cShiftUrl = `/cshift/`;
|
||||
// return Promise.all(
|
||||
// postBodies.map(postBody => post(cShiftUrl, postBody).catch(() => false))
|
||||
// ).then(postResponses => {
|
||||
// Promise.resolve(postResponses);
|
||||
// });
|
||||
return Promise.all(
|
||||
postBodies.map(postBody =>
|
||||
post(cShiftUrl, postBody).catch(err => {
|
||||
post("/cshift/", postBody).catch(err => {
|
||||
return { error: true, ...err };
|
||||
})
|
||||
)
|
||||
@@ -17,3 +11,7 @@ export function createCShifts(postBodies) {
|
||||
return Promise.resolve(resp);
|
||||
});
|
||||
}
|
||||
|
||||
export function getCShifts(params) {
|
||||
return get("/cshift/", params).then(resp => Promise.resolve(resp));
|
||||
}
|
||||
|
Reference in New Issue
Block a user