-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add a route to show user targets #712
Add a route to show user targets #712
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
f646097
to
4f8dfe7
Compare
@chenparnasa, you okay with going forward with this, for now? |
There's some code for creating a target, but it must go through design first.
4f8dfe7
to
5019d4c
Compare
We must pass undefined because the server won't accept an empty string. Undefined will make the server use the default value, which is an empty string.
Allow empty topic descriptions
Don't allow filtering on userName since the attribute isn't in the collection to be filtered. Allow filtering on type since it is available and it would be userful. Change $createdAt type to datetime to allow filtering by greater/less than.
const promisesById: Record<string, Promise<any>> = {}; | ||
targets.targets.forEach((target) => { | ||
if (target.providerId && !promisesById[target.providerId]) { | ||
promisesById[target.providerId] = sdk.forProject.client.call( | ||
'GET', | ||
new URL( | ||
`${sdk.forProject.client.config.endpoint}/messaging/providers/${target.providerId}` | ||
), | ||
{ | ||
'X-Appwrite-Project': sdk.forProject.client.config.project, | ||
'content-type': 'application/json', | ||
'X-Appwrite-Mode': 'admin' | ||
} | ||
); | ||
} | ||
}); |
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.
Fetching providers here because Jake said:
Any way the API does this will be exceedingly heavy-handed, since there are likely to be only a few providers but many targets, can we use a memory-map and just fetch ones into it as they're missing while iterating targets?
…ibers Update filterable subscriber columns
Message is nested in data and isn't an attribute so it can't be queried.
77d5482
into
fix-create-provider-enabled
What does this PR do?
Add a route to show user targets
There's some code for creating a target, but it must go through design first.
Test Plan
Manual
Related PRs and Issues
Parent:
Child:
Have you read the Contributing Guidelines on issues?
Yes