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

#24-CRUD-upsert-driver #34

Merged
merged 4 commits into from
Sep 21, 2023
Merged

#24-CRUD-upsert-driver #34

merged 4 commits into from
Sep 21, 2023

Conversation

RadiantBunny633
Copy link
Contributor

@RadiantBunny633 RadiantBunny633 commented Sep 21, 2023

Changes

I added the service function for upsertDriver and in order to test this we needed to call a getAllDrivers type of service function so I made that as well. I also added testing for both of the service functions I added and lastly I added the getAllDrivers to the message map.

Notes

The tests were running fine in the terminal I'm gonna try to figure out why its not working here.

To Do

Any remaining things that need to get done

  • perhaps just more service functions for the rest of the stuff in the schema

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No package-lock.json changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #24

@RadiantBunny633 RadiantBunny633 self-assigned this Sep 21, 2023
@RadiantBunny633 RadiantBunny633 linked an issue Sep 21, 2023 that may be closed by this pull request
Copy link
Contributor

@Peyton-McKee Peyton-McKee left a comment

Choose a reason for hiding this comment

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

nicely done, a nit pick and why ur test isnt failing are the only comments i have

* CRUD operation to create a driver in the database if it doesn't already exist, does nothing otherwise.
*
*/
export const upsertDriver = async (driver_name: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

we dont user _ really, should be camel case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see i see changing it rn.

*/
test('Get All Data Types Works', async () => {
const expected = [{ username: 'test' }];
const result = await getAllDrivers();
Copy link
Contributor

Choose a reason for hiding this comment

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

this isnt going to pass because it doesnt exist in the database yet

I think this should fix the test issue
Fixed it so that it camel cases
Peyton-McKee
Peyton-McKee previously approved these changes Sep 21, 2023
Copy link
Contributor

@Peyton-McKee Peyton-McKee left a comment

Choose a reason for hiding this comment

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

Nicely Done

Copy link
Contributor

@Peyton-McKee Peyton-McKee left a comment

Choose a reason for hiding this comment

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

oh whoops my workflows caught an error lmaooooooo

Copy link
Contributor

@Peyton-McKee Peyton-McKee left a comment

Choose a reason for hiding this comment

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

yay

@Peyton-McKee Peyton-McKee merged commit 015682c into main Sep 21, 2023
4 checks passed
@Peyton-McKee Peyton-McKee deleted the #24-CRUD-upsert-driver branch September 21, 2023 16:38
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.

CRUD Operations - Upsert Driver
2 participants