refac
This commit is contained in:
1 parent
f7406ff576
commit
3c7f9aa6a4
27 files changed
+789
-253
No files matched your search
@@ -4,7 +4,7 @@ export const createNewKnowledge = async (
|
||||
token: string,
|
||||
name: string,
|
||||
description: string,
|
||||
accessControl: null | object
|
||||
accessGrants: object[]
|
||||
) => {
|
||||
let error = null;
|
||||
|
||||
@@ -18,7 +18,7 @@ export const createNewKnowledge = async (
|
||||
body: JSON.stringify({
|
||||
name: name,
|
||||
description: description,
|
||||
access_control: accessControl
|
||||
access_grants: accessGrants
|
||||
})
|
||||
})
|
||||
.then(async (res) => {
|
||||
@@ -248,7 +248,7 @@ type KnowledgeUpdateForm = {
|
||||
name?: string;
|
||||
description?: string;
|
||||
data?: object;
|
||||
access_control?: null | object;
|
||||
access_grants?: object[];
|
||||
};
|
||||
|
||||
export const updateKnowledgeById = async (token: string, id: string, form: KnowledgeUpdateForm) => {
|
||||
@@ -265,7 +265,7 @@ export const updateKnowledgeById = async (token: string, id: string, form: Knowl
|
||||
name: form?.name ? form.name : undefined,
|
||||
description: form?.description ? form.description : undefined,
|
||||
data: form?.data ? form.data : undefined,
|
||||
access_control: form.access_control
|
||||
access_grants: form.access_grants
|
||||
})
|
||||
})
|
||||
.then(async (res) => {
|
||||
|
||||
Reference in new issue
Block a user