|
@@ -25,10 +25,10 @@ export function saveActivity({
|
|
}) {
|
|
}) {
|
|
const data = pickBy(
|
|
const data = pickBy(
|
|
{
|
|
{
|
|
|
|
+ examId,
|
|
id,
|
|
id,
|
|
code,
|
|
code,
|
|
enable,
|
|
enable,
|
|
- examId,
|
|
|
|
finishTime,
|
|
finishTime,
|
|
maxDurationSeconds,
|
|
maxDurationSeconds,
|
|
openingSeconds,
|
|
openingSeconds,
|
|
@@ -37,7 +37,9 @@ export function saveActivity({
|
|
},
|
|
},
|
|
(v) => v !== ""
|
|
(v) => v !== ""
|
|
);
|
|
);
|
|
- return httpApp.post("/api/admin/activity/save", data);
|
|
|
|
|
|
+ return httpApp.post("/api/admin/activity/save", [data]);
|
|
}
|
|
}
|
|
|
|
|
|
-export function toggleEnableActivity() {}
|
|
|
|
|
|
+export function toggleEnableActivity({ examId, id, enable }) {
|
|
|
|
+ return httpApp.post("/api/admin/activity/save", [{ examId, id, enable }]);
|
|
|
|
+}
|