-
Notifications
You must be signed in to change notification settings - Fork 41
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
Feature/beacons backend #726
Conversation
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #726 +/- ##
==========================================
+ Coverage 56.30% 56.37% +0.06%
==========================================
Files 293 295 +2
Lines 6981 7028 +47
Branches 943 943
==========================================
+ Hits 3931 3962 +31
- Misses 2858 2874 +16
Partials 192 192
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
async def get_beacon(beacon_id: str): | ||
beacon_state = await ttm.BeaconState.get_or_none(id=beacon_id) | ||
if beacon_state is None: | ||
raise HTTPException(404, f"Beacon with ID {id} not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise HTTPException(404, f"Beacon with ID {id} not found") | |
raise HTTPException(404, f"Beacon with ID {beacon_id} not found") |
Otherwise I am getting the following error if I submit a non-existent beacon ID:
{
"detail": "Beacon with ID <built-in function id> not found"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done! 9bc5112, thanks for catching that
Signed-off-by: Aaron Chong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
What's new
New backend for beacons
To test,
There will be a follow-up feature for the frontend
Self-checks