Skip to content

Commit

Permalink
fix: move out email subscription creation from profile
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Nov 4, 2024
1 parent a61292a commit ed5304c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 34 deletions.
22 changes: 5 additions & 17 deletions src/schemas/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,11 @@
"pattern": "^[a-z0-9-]*$",
"maxLength": 17
},
"emailSubscription": {
"type": "object",
"properties": {
"email": {
"type": "string",
"title": "email",
"maxLength": 256
},
"subscriptions": {
"type": "array",
"title": "subscriptions",
"uniqueItems": true,
"items": { "type": "string" }
}
},
"required": [],
"additionalProperties": false
"emailSubscriptions": {
"type": "array",
"title": "email subscriptions",
"uniqueItems": true,
"items": { "type": "string" }
}
},
"required": [],
Expand Down
8 changes: 0 additions & 8 deletions test/examples/profile-addEmailSubscription.json

This file was deleted.

4 changes: 1 addition & 3 deletions test/examples/profile-updateEmailSubscription.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
"name": "Vitalik",
"avatar": "ipfs://NnVTdgcFciJUoxqgsNe9Hy2R7rgvEb5jDu5Pa5mmEG3UghbubTf2M78jUXbKLqKM",
"about": "This is my about info",
"emailSubscription": {
"subscriptions": ["summary", "newProposal"]
}
"emailSubscriptions": ["summary", "newProposal"]
}
6 changes: 0 additions & 6 deletions test/schema.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import spaceStarknetDelegation from './examples/space-starknet-delegation.json';
import proposalTurbo from './examples/proposal-turbo.json';
import vote from './examples/vote.json';
import profile from './examples/profile.json';
import profileAddEmailSubscription from './examples/profile-addEmailSubscription.json';
import profileUpdateEmailSubscription from './examples/profile-updateEmailSubscription.json';
import statement from './examples/statement.json';
import alias from './examples/alias.json';
Expand All @@ -26,11 +25,6 @@ describe.each([
{ schemaType: 'proposal', schema: schemas.proposal, example: proposal },
{ schemaType: 'vote', schema: schemas.vote, example: vote },
{ schemaType: 'profile', schema: schemas.profile, example: profile },
{
schemaType: 'profile',
schema: schemas.profile,
example: profileAddEmailSubscription
},
{
schemaType: 'profile',
schema: schemas.profile,
Expand Down

0 comments on commit ed5304c

Please sign in to comment.