Skip to content

Commit

Permalink
fix: file upload route url
Browse files Browse the repository at this point in the history
  • Loading branch information
CaduGomes committed Jan 9, 2024
1 parent 3acb76f commit 1161b03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/imports/meta/validateAndProcessValueFor.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@ export async function validateAndProcessValueFor({ meta, fieldName, value, actio
};
}
}

return {
success: false,
errors: [
{
message: `Value for field ${fieldName} must contains a property named 'match' with one of values ['and', 'or']`,
},
],
};
};

const mustBeString = (v, path) => {
Expand Down
2 changes: 1 addition & 1 deletion src/server/routes/rest/file2/file2Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const file2Api: FastifyPluginCallback = (fastify, _, done) => {
recordCode: string;
fieldName: string;
};
}>('/rest/file2/:document/:recordCode/:fieldName', async function (req, reply) {
}>('/rest/file2/:document/:recordCode/:fieldName/', async function (req, reply) {
const authTokenId = getAuthTokenIdFromReq(req);
const { success, data: user, errors } = (await getUserSafe(authTokenId)) as any;
if (success === false) {
Expand Down

0 comments on commit 1161b03

Please sign in to comment.