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

[Scylla] - Endpoint for changing a Run note #248

Open
bracyw opened this issue Nov 27, 2024 · 2 comments
Open

[Scylla] - Endpoint for changing a Run note #248

bracyw opened this issue Nov 27, 2024 · 2 comments

Comments

@bracyw
Copy link
Contributor

bracyw commented Nov 27, 2024

Description

Right now we only have support for updating coordinates of a run, fetching runs based on ID, and creating runs. We want to have a endpoint in scylla that can update a Run note (run notes are for engineers to make notes while we collecting data, which are separated by Runs.

Acceptance Criteria

Service is tested (in run_service_test.rs) and works as expected (updates a runs note).
Route is tested using Postman, if you haven't used Postman before here is an explination by the Goat himself: https://www.youtube.com/watch?v=CgFTb_hKdEo&feature=youtu.be

If you have any questions about Postman testing (after watching the video), let me know.

Proposed Solution

  1. Add a service in run_service.rs that takes the the db, run_id and note, and updates the note of the run with the given ID (see other services that use diesel::update as examples), that returns the updated Run
  2. Add a controller in run_controllers.rs that takes in that run id and a note through Path (see other functions as an example), and calls your service function and then puts it's output (Run) into a into the PublicRun transformer and returns the result or an error (see other functions as examples)
  3. Add a route to the Router in main.rs (follow the format of other routes (except this time take in a note and a Run ID))., that uses your controller.

Mocks

No response

@jr1221
Copy link
Contributor

jr1221 commented Dec 19, 2024

Also support driver and location name.

@jr1221
Copy link
Contributor

jr1221 commented Dec 19, 2024

Support this upon creation, maybe also upon update but definitely as options for the runs/new endpoint.

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

No branches or pull requests

2 participants