Skip to content
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

Company router #23

Merged
merged 8 commits into from
Feb 3, 2024
Merged

Company router #23

merged 8 commits into from
Feb 3, 2024

Conversation

banushi-a
Copy link
Contributor

@banushi-a banushi-a commented Jan 30, 2024

Description

Created CRUD endpoints from the Company router

Copy link

vercel bot commented Jan 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cooper ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 9:02pm

prisma/schema.prisma Outdated Show resolved Hide resolved
src/server/api/root.ts Outdated Show resolved Hide resolved
@RishikeshNK
Copy link
Collaborator

Also, just remembered, remove the .gitkeep file in the routers folder since that is no longer needed.

import { Industry } from "@prisma/client";

export const companyRouter = createTRPCRouter({
getAll: publicProcedure.query(({ ctx }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Last change: could we rename the endpoints to list (in place of getAll), getByName, create, update, and delete to keep the API minimal?

Copy link
Collaborator

@RishikeshNK RishikeshNK left a comment

Choose a reason for hiding this comment

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

LGTM! tRPC ❤️‍🔥

@banushi-a banushi-a merged commit 397f22a into main Feb 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants