mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: forward org_id values for lectures
This commit is contained in:
parent
98b470f2ab
commit
447ac93649
6 changed files with 75 additions and 67 deletions
|
|
@ -1,13 +1,13 @@
|
|||
import { getAPIUrl } from "@services/config";
|
||||
import { RequestBody, RequestBodyForm } from "@services/utils/requests";
|
||||
|
||||
export async function createLecture(data: any, chapter_id: any) {
|
||||
export async function createLecture(data: any, chapter_id: any, org_id: any) {
|
||||
data.content = {};
|
||||
|
||||
// remove chapter_id from data
|
||||
delete data.chapterId;
|
||||
|
||||
|
||||
const result: any = await fetch(`${getAPIUrl()}lectures/?coursechapter_id=${chapter_id}`, RequestBody("POST", data))
|
||||
const result: any = await fetch(`${getAPIUrl()}lectures/?coursechapter_id=${chapter_id}&org_id=${org_id}`, RequestBody("POST", data))
|
||||
.then((result) => result.json())
|
||||
.catch((error) => console.log("error", error));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue