Skip to content

add validation when create/update App#2020

Merged
beastoin merged 1 commit intoBasedHardware:mainfrom
nquang29:be_2011
Mar 24, 2025
Merged

add validation when create/update App#2020
beastoin merged 1 commit intoBasedHardware:mainfrom
nquang29:be_2011

Conversation

@nquang29
Copy link
Copy Markdown
Collaborator

@nquang29 nquang29 commented Mar 15, 2025

@nquang29
Copy link
Copy Markdown
Collaborator Author

@beastoin pls help me to review

@beastoin
Copy link
Copy Markdown
Collaborator

1/ learn about the pydantic model then apply it.

@nquang29

@nquang29 nquang29 force-pushed the be_2011 branch 2 times, most recently from 1d99006 to c871d2c Compare March 16, 2025 18:48
@nquang29
Copy link
Copy Markdown
Collaborator Author

1/ attempted to apply pydantic. pls help me to review again @beastoin

@beastoin
Copy link
Copy Markdown
Collaborator

1/ ok
2/ one more step, only accept specific fields on updating the app, for example we should not approve update the admin-fields such as approved, status, remember the form models in Gin ?

@nquang29

@nquang29
Copy link
Copy Markdown
Collaborator Author

2/ i defined list restricted fields to prevent user from update this @beastoin

@beastoin
Copy link
Copy Markdown
Collaborator

2/ use whitelist instead of blacklist. we should have the allowed fields for creation as well.

@nquang29 last commit please 😌

@nquang29
Copy link
Copy Markdown
Collaborator Author

2/ done sir @beastoin . but i think we should separate model to AppUpdate, AppCreate for api create/update

@beastoin
Copy link
Copy Markdown
Collaborator

2/ separating the model, do it pls @nquang29

@nquang29
Copy link
Copy Markdown
Collaborator Author

2/ done sir @beastoin

@beastoin beastoin merged commit 79d9d17 into BasedHardware:main Mar 24, 2025
@beastoin
Copy link
Copy Markdown
Collaborator

lgtm @nquang29 🌚

Next, let's make the model a bit more generic and share your test with our app (in dev env).

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
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