Skip to content

Commit

Permalink
api: Fix /asset/import API request payload schema
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges committed Feb 11, 2022
1 parent 728b4d4 commit 181959d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/controllers/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ app.post(
req.config.vodObjectStoreId,
req.body
);
if (!req.body.url) {
if (typeof req.body?.url !== "string") {
return res.status(422).json({
errors: ["You must provide a url from which import an asset"],
});
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/schema/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ components:
example: 09F8B46C-61A0-4254-9875-F71F4C605BC7

new-asset-payload:
additionalProperties: false
additionalProperties: true
required:
- name
properties:
Expand Down

0 comments on commit 181959d

Please sign in to comment.