json type, user.cfc

This commit is contained in:
msyu
2025-02-28 15:05:12 +03:00
parent 507737c41f
commit eb0dc3352d
4 changed files with 67 additions and 14 deletions
+6 -1
View File
@@ -51,7 +51,7 @@
//variables.framework.docs={};
variables.framework.docs.APIName="Deck API";
variables.framework.docs.APIVersion="0.058";
variables.framework.docs.APIVersion="0.059";
variables.framework.globalHeaders = structNew();
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
@@ -207,6 +207,11 @@
}
var usrCustomerInfo=getUsrCustomerInfo(idpUserData.contactId);
if (lCase(arguments.cfc) EQ 'user') {
if (structIsEmpty(usrCustomerInfo)) return representationOf("User information not found").withStatus(404);
}
if (structIsEmpty(usrCustomerInfo)) return representationOf("Cannot find default specification for current user #result#").withStatus(422); //это создает довольно много лишних движений при отладке
arguments.requestArguments.usrId=usrCustomerInfo.usrId; //Integer!
arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //Integer