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

Create and test a function insertNewRole #184

Closed
jaytula opened this issue Sep 25, 2021 · 0 comments · Fixed by #201
Closed

Create and test a function insertNewRole #184

jaytula opened this issue Sep 25, 2021 · 0 comments · Fixed by #201
Assignees
Labels
Enhancement Improves or adds something Front End Focused on Front End code (NextJS / Styled Components)

Comments

@jaytula
Copy link
Contributor

jaytula commented Sep 25, 2021

This issue requires that #181 is resolved first.

We need a function to insert a new role into the roles table in the DB.

The functions should take this shape:

const insertNewRole = async (name: string) => {
  // Have fun
}

Return either the result of the insert query or null for when the role already exists.

  • Function should be in db/roles.ts
  • Also write tests to test in test/roles.test.ts
@ZumDeWald ZumDeWald added Enhancement Improves or adds something Front End Focused on Front End code (NextJS / Styled Components) hacktoberfest-accepted Accept for Hacktoberfest, will merge after review and removed hacktoberfest-accepted Accept for Hacktoberfest, will merge after review labels Sep 29, 2021
@ZumDeWald ZumDeWald self-assigned this Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improves or adds something Front End Focused on Front End code (NextJS / Styled Components)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants