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

default, server_default and creating new invitation #44

Closed

Conversation

KamiTzayig
Copy link
Contributor

in order for the default values to be inserted from the db when creating a new sql row you need to add default &server_default to the models.py so sqlalchemy can expect the values to be inserted, also i created the restapi for creating a new order

…l row you need to add default &server_default to the models.py in order for the sqlalchemy to expect the values to be inserted, also i created the restapi for creating a new order
Copy link
Contributor

@yarons yarons left a comment

Choose a reason for hiding this comment

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

There has been some changes introduced by @inbarbarkai, I want to make sure we're not conflicting, can you please take a look at hist branch and consult him about this?

@yarons yarons added this to In progress in invitease-backend Dec 13, 2021
@inbarbarkai
Copy link
Collaborator

Lets merge mine and see, it shouldn't contain too much conflicts if any.

@router.get("/invite", summary="Creates a new invitation for this user.")
def create_invitation(invitations: InvitationRepository = Depends(create_invitations_list), user_id: str = None, invitees_amount: int = None, invitees_arrival_timestamp_epoch: int = None,comment_for_guard: str = None):
new_invitation = Invitation(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do some data validations

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you using get to create new invite?
Use post or put.
Also, prefably, don't use query parameters for input.
Use the body

@router.get("/invite", summary="Creates a new invitation for this user.")
def create_invitation(invitations: InvitationRepository = Depends(create_invitations_list), user_id: str = None, invitees_amount: int = None, invitees_arrival_timestamp_epoch: int = None,comment_for_guard: str = None):
new_invitation = Invitation(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you using get to create new invite?
Use post or put.
Also, prefably, don't use query parameters for input.
Use the body

@yarons
Copy link
Contributor

yarons commented Jan 3, 2022

@inbarbarkai I'm guessing it's no longer relevant, am I correct?
Sorry @KamiTzayig :(

@inbarbarkai
Copy link
Collaborator

@yarons I don't know... That is for @KamiTzayig to decide

@yarons
Copy link
Contributor

yarons commented Jan 8, 2022

@KamiTzayig we should rebase your changes, some of them are required for your UI work.

@yarons
Copy link
Contributor

yarons commented May 2, 2022

Conflicting, irrelevant, reopen if necessary.

@yarons yarons closed this May 2, 2022
invitease-backend automation moved this from In progress to Done May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants