Skip to content

Commit

Permalink
Merge pull request #147 from Whats-Cookin/fix/allow-null-issuerId
Browse files Browse the repository at this point in the history
remember this is for demos please be forgiving!  we do NOT always have issuerId!!
  • Loading branch information
gvelez17 authored Oct 26, 2024
2 parents cec2f83 + 96d2f6e commit cd07afa
Show file tree
Hide file tree
Showing 2 changed files with 4,439 additions and 4,342 deletions.
14 changes: 7 additions & 7 deletions src/middlewares/validators/claim.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { passToExpressErrorHandler } from "../../utils";
const claimPostSchema = Joi.object({
subject: Joi.string().required(),
claim: Joi.string().required(),
issuerId: Joi.string().allow(""),
object: Joi.string().allow(""),
issuerId: Joi.string().allow("", null),
object: Joi.string().allow("", null),
statement: Joi.string().allow(""),
aspect: Joi.string().allow(""),
aspect: Joi.string().allow("", null),
amt: Joi.alternatives().try(
Joi.string()
.allow("")
Expand All @@ -26,15 +26,15 @@ const claimPostSchema = Joi.object({
Joi.number()
),
name: Joi.string().required(),
howKnown: Joi.string().allow(""),
howKnown: Joi.string().allow("", null),
images: Joi.array().items(
Joi.object({
url: Joi.string().required(),
metadata: Joi.object().allow(null).pattern(/.*/, Joi.any()),
effectiveDate: Joi.date().allow(null),
digestMultibase: Joi.string().allow(null),
signature: Joi.string().required(),
owner: Joi.string().required(),
signature: Joi.string().allow(null),
owner: Joi.string().allow(null),
})
),
sourceURI: Joi.string().allow(""),
Expand Down Expand Up @@ -73,4 +73,4 @@ export const claimPostValidator = async (
err.statusCode = 400;
passToExpressErrorHandler(err, next);
}
};
};
Loading

0 comments on commit cd07afa

Please sign in to comment.