-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic implementation of Email PODs in Z API #2194
base: main
Are you sure you want to change the base?
Basic implementation of Email PODs in Z API #2194
Conversation
collectionId === "Devcon SEA" || | ||
collectionId === "Email" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit -- maybe make this an array const? something like VIRTUAL_COLLECTIONS
(or another name) ?
@@ -21,8 +30,16 @@ export function getPODsForCollections( | |||
.flatMap((collectionId) => | |||
collectionId === "Devcon SEA" | |||
? pcds.getAllPCDsInFolder("Devcon SEA") | |||
: collectionId === "Email" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and then refactor this into a nice function if collection id is in VIRTUAL_COLLECTIONS
} | ||
}); | ||
const pods = await z.pod.collection("Email").query(q); | ||
console.log(pods); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm
console.log(pods); | ||
setPODs(pods); | ||
} catch (e) { | ||
console.log(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(e); | |
console.error(e); |
This adds a special "virtual collection" called Emails, which contains the user's Email PODs. Zapps can request permission to this collection, which will allow them to read the Email PODs directly, and to make proofs about them. Updates to the collection are not allowed.