Skip to content

Add occupations and work preference validations to the job applicant profile update method#89

Merged
lsipii merged 2 commits intomainfrom
VFD-174-parannetaan-users-api-n-endpointtien-data-validointia-occupations-ja-work-preferences-tietojen-osalta-2
Oct 16, 2023
Merged

Add occupations and work preference validations to the job applicant profile update method#89
lsipii merged 2 commits intomainfrom
VFD-174-parannetaan-users-api-n-endpointtien-data-validointia-occupations-ja-work-preferences-tietojen-osalta-2

Conversation

@lsipii
Copy link
Copy Markdown
Contributor

@lsipii lsipii commented Oct 13, 2023

  • adds the occupations and work preference enum-value validations to the UpdateJobApplicantProfile productizer operation:
    • accept only known enum values that relates to the data products related to the occupations and work preferences..
  • adds fluent validation error handling to the app middleware ErrorHandlerMiddleware: so those errors produce output match to the tesbed requirements as well..

@lsipii lsipii requested a review from LauriGofore October 13, 2023 20:04
RuleFor(occupations => occupations)
.MustAsync(async (occupations, cancellationToken) =>
{
var knownOccupations = await _occupationsFlatRepository.GetAllOccupationsFlat();
Copy link
Copy Markdown
Contributor

@LauriGofore LauriGofore Oct 16, 2023

Choose a reason for hiding this comment

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

Lataakos nämä jostain muistista, ettei network requa tee joka kerta. (varmaan ite ollut tämän päällä joskus, ei muista 😅 )

e: no vähemmän laiskana kävin kurkkaa, niin kai se sinne jonnekin muistiin menee (tuolla oli joku TODO in-memory cachee liittyen.. mutta toiminnee)

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.

e: no vähemmän laiskana kävin kurkkaa, niin kai se sinne jonnekin muistiin menee (tuolla oli joku TODO in-memory cachee liittyen.. mutta toiminnee)

Joops tuo tieto tulee codesets-riippuvuudesta ja se repository säilöö asian lambda-instanssin elinajan verran, eli muistista muistelee. Ne TODO-merkinnät voisi ehkä käsitellä kanssa jossain kohti näitä siivoiluja..

Copy link
Copy Markdown
Contributor

@LauriGofore LauriGofore left a comment

Choose a reason for hiding this comment

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

👍

@lsipii lsipii merged commit 46a8068 into main Oct 16, 2023
@lsipii lsipii deleted the VFD-174-parannetaan-users-api-n-endpointtien-data-validointia-occupations-ja-work-preferences-tietojen-osalta-2 branch October 16, 2023 12:05
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