Skip to content

Suggest User#31

Merged
qweliant merged 26 commits into
mainfrom
qdt/suggested-user
Aug 23, 2023
Merged

Suggest User#31
qweliant merged 26 commits into
mainfrom
qdt/suggested-user

Conversation

@qweliant
Copy link
Copy Markdown
Contributor

@qweliant qweliant commented Aug 14, 2023

Adds route implementation to autosuggest user and implements the pub contract using ts-rest

query pubs using:
http://localhost:3000/api/<:ntegrationId>/pub/<pubId>

query autosuggested members using
http://localhost:3000/api/<integraionId>/autosuggest/<pubId>/members/<memberCandidateString>

…ing using something like express slow down
@isTravis isTravis temporarily deployed to qdt/suggested-user - core PR #31 August 15, 2023 00:33 — with Render Destroyed
return (
<div
key={button.actions[0].text}
key={button.actions ? button.actions[0].text : "action"}
Copy link
Copy Markdown
Contributor Author

@qweliant qweliant Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting a type error that said button actions may be undefined when running pnpm build. Im not sure if this fix is required or not but it resolved the err i was getting


const PubFieldsSchema = z.any();

export type PubFieldsResponse = z.infer<typeof PubFieldsSchema>;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are not using this type so ive removed it

@qweliant
Copy link
Copy Markdown
Contributor Author

qweliant commented Aug 16, 2023

i have removed every unimplemented api/v7/integrations route and copied their contents into a corresponding contract file. I have also rearranged folders to live under lib. Im open to any suggestion on changes made to the current structure.

Comment thread core/app/c/[communitySlug]/pubs/PubRow.tsx
Comment thread core/lib/contracts/index.ts Outdated
Comment thread core/lib/server/autosuggest.ts Outdated
Comment thread core/lib/server/autosuggest.ts Outdated
import prisma from "~/prisma/db";
import { SuggestedMember } from "~/lib/contracts/resources/autosuggest";

const getMembers = async (input: string): Promise<SuggestedMember[]> => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a more descriptive variable name than input. Maybe namePart or partialName or something along those lines.

Comment thread core/lib/server/pubs.ts Outdated
Comment thread core/lib/server/pubs.ts Outdated
Comment thread core/pages/api/[instamce_id]/[...ts-rest].ts
@isTravis isTravis temporarily deployed to qdt/suggested-user - core PR #31 August 23, 2023 01:15 — with Render Destroyed
@qweliant qweliant requested a review from 3mcd August 23, 2023 13:01
Copy link
Copy Markdown
Collaborator

@3mcd 3mcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qweliant qweliant merged commit 46cef9f into main Aug 23, 2023
@qweliant qweliant deleted the qdt/suggested-user branch August 23, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants