Skip to content

REST API -endpointit henkilöille ja merkkipäiville|antti/api-for-person-and-anniversary#66

Merged
anttiasmala merged 74 commits intomainfrom
antti/api-for-person-and-anniversary
Jul 21, 2025
Merged

REST API -endpointit henkilöille ja merkkipäiville|antti/api-for-person-and-anniversary#66
anttiasmala merged 74 commits intomainfrom
antti/api-for-person-and-anniversary

Conversation

@anttiasmala
Copy link
Collaborator

Valmis prototyyppi persons- ja anniversaries-API:sta.

Kommentit puuttuu toistaiseksi, muuten valmis tarkistettavaksi

… some rules to patchAnniversarySchema. Rename type in types.ts. Do edits in files /shared/types.ts and /shared/zodSchemas.ts
@vercel
Copy link

vercel bot commented Mar 24, 2025

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

Name Status Preview Comments Updated (UTC)
lahjalista ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 27, 2025 11:44am

@anttiasmala anttiasmala self-assigned this Mar 24, 2025
@anttiasmala anttiasmala linked an issue Mar 24, 2025 that may be closed by this pull request
Comment on lines +7 to +9
export const uuidParseSchema = z
.string({ message: 'Invalid UUID! It should be given as a string!' })
.uuid('UUID pattern was invalid!');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tämän olin näköjään ajatuksissani kirjoittanut englanniksi. Vaihdan suomeksi

Copy link
Owner

Choose a reason for hiding this comment

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

Eikö olisi nopeampi vain vaihtaa se suomeksi ja jättää kommentti kirjoittamatta?

Copy link
Collaborator Author

@anttiasmala anttiasmala Apr 27, 2025

Choose a reason for hiding this comment

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

Olisi ja tulevaisuudessa toimin siten! En korjannut tätä vielä, jotenkin tosi tönkön kuuloinen suomeksi (UUID-yksilöintitunnus on virheellinen!) 😄

Myöskään en ole ihan 100% varma vaikuttaako se joihinkin virheenkäsittelijöihin backendissä. Jos tuo halutaan muuttaa suomeksi, tekisin sen toisessa branchissa

Comment on lines +7 to +9
export const uuidParseSchema = z
.string({ message: 'Invalid UUID! It should be given as a string!' })
.uuid('UUID pattern was invalid!');
Copy link
Owner

Choose a reason for hiding this comment

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

Eikö olisi nopeampi vain vaihtaa se suomeksi ja jättää kommentti kirjoittamatta?

Comment on lines +67 to +76
const findIfPersonBelongsToUser = await prisma.person.findFirst({
where: {
uuid: personUUID,
userUUID: userData.uuid,
},
});
if (!findIfPersonBelongsToUser) {
throw new HttpError('Henkilöä ei löytynyt tietokannasta!', 400);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Toteutus ehdotuksestani #66 (comment)

@anttiasmala
Copy link
Collaborator Author

En tiedä oliko tästä tarvetta laittaa ReReview-pyyntöä, mutta laitoin varalta. Mergesin main-branchin, oli TODO.md-tiedoston kanssa konflikti

Copy link
Owner

@samuliasmala samuliasmala left a comment

Choose a reason for hiding this comment

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

Hyvältä näyttää, voi mergetä.

@anttiasmala anttiasmala merged commit 7458fc6 into main Jul 21, 2025
3 checks passed
@anttiasmala anttiasmala deleted the antti/api-for-person-and-anniversary branch July 21, 2025 08:19
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.

16. Luodaan rajapinta henkilölle ja merkkipäivälle

2 participants