-
Notifications
You must be signed in to change notification settings - Fork 675
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
Feat search #300
base: main
Are you sure you want to change the base?
Feat search #300
Conversation
|
||
async function createIndex(obj: algoliaobjSchema[], trackID: string) { | ||
const client = algoliasearch(process.env.ALGOLIA_APP_ID || "", process.env.ALGOLIA_ADMIN_API_KEY || ""); | ||
const index = client.initIndex(trackID); |
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.
It will be a good idea to protect API routes with auth or better use server actions instead of APIs.
I have made PR for the same issue you can check it #294
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.
Yes better to create server actions.
PR Fixes: #175
Dailycode.-.Google.Chrome.2024-04-18.00-03-51.1.mp4
-https://drive.google.com/file/d/17Uu64SDal69tg0wgyJlBCtMSRYGDlb9W/view?usp=sharing
Remaining (Suggestions needed):
Feature-To make change in search index whenever the notiondoc changes.
Answer - If notionApi permits a webhook like functionality. I will implement it within day. alternatively, we can add a get request to update the search index in intervals (will move with option 2 only if option 1 is not possible).
Also let me know if I am on the right track so that i can make the UI pleasing. Or did you mean something else.
Checklist before requesting a review