Files
SnowLuma/.pnpm-store/v11/files/8f/d8fc4e7c55c82b47ad0f3fceccd1158ab0b78498553249ab6673fe07c5833bcf1256cada18bcf6ee2523b2d94e7109b30c1b2d741101bb59f35454be9b86f4
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

15 lines
404 B
Plaintext

export function addErrorMessage(res, key, errorMessage, refs) {
if (!refs?.errorMessages)
return;
if (errorMessage) {
res.errorMessage = {
...res.errorMessage,
[key]: errorMessage,
};
}
}
export function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
res[key] = value;
addErrorMessage(res, key, errorMessage, refs);
}