Skip to content

Commit

Permalink
Merge pull request #83 from Giveth/fix-metadata-SCHEMA-on-userSuperTo…
Browse files Browse the repository at this point in the history
…kensCritical

fix metadata SCHEMA on userSuperTokensCritical
  • Loading branch information
RamRamez authored Apr 9, 2024
2 parents 3d82be4 + 05e777f commit a6fd3c4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/utils/validators/segmentAndMetadataValidators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,16 @@ const givBackReadyClaimSchema = Joi.object({
amount: Joi.string().required(),
});

const superFluidTokenTrackerSchema = Joi.object({
const superFluidTokenMetadataSchema = Joi.object({
tokenSymbol: Joi.string().required(),
email: Joi.string().required(),
userId: Joi.number().required(),
isEnded: Joi.boolean(),
projectTitle: Joi.string(),
projectLink: Joi.string(),
});

const superFluidTokenSegmentSchema = Joi.object({
tokenSymbol: Joi.string().required(),
email: Joi.string().required(),
userId: Joi.number().required(),
Expand All @@ -156,8 +165,8 @@ export const SEGMENT_METADATA_SCHEMA_VALIDATOR: {
};
} = {
userSuperTokensCritical: {
metadata: superFluidTokenTrackerSchema,
segment: superFluidTokenTrackerSchema,
metadata: superFluidTokenMetadataSchema,
segment: superFluidTokenSegmentSchema,
},
draftedProjectSavedValidator: {
metadata: projectTitleProjectLinkSchema,
Expand Down

0 comments on commit a6fd3c4

Please sign in to comment.