1
0
forked from apxtri/apxtri

fix itm update on apxid

This commit is contained in:
philc 2024-11-13 11:40:47 +01:00
parent 92132e4ae7
commit 62a75d353e

View File

@ -658,7 +658,7 @@ Odmdb.cud = (objectPathname, crud, itm, role, runindex = true) => {
if (crud == "U" && accessright.U.length > 0) {
itmtostore = itmold;
const keynotallow = Object.keys(itm).filter(
(el) => !accessright.U.includes(el)
(el) => !(el==getschema.data.schema.apxid || accessright.U.includes(el))
);
if (keynotallow.length > 0) {
feedbackinfo.keynotallow = keynotallow;
@ -704,7 +704,7 @@ Odmdb.cud = (objectPathname, crud, itm, role, runindex = true) => {
fs.ensureDirSync(`${objectPathname}/img/`);
//console.log("check this for k:", k, " itmtostore[k]:", itmtostore[k]);
const imgb64 = itmtostore[k].replace(
/^data:image\/(png|png|gif|bmp|jpg|jpeg);base64,/,
/^data:image\/(png|gif|bmp|jpg|jpeg);base64,/,
""
); //.replace(/\+/g," ");
const extension = itmtostore[k].split(";base64,")[0].split("/")[1];