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

backend conversion route for tracings to hybrid #3324

Merged
merged 6 commits into from
Oct 9, 2018
Merged

Conversation

youri-k
Copy link
Contributor

@youri-k youri-k commented Oct 5, 2018

  • create a make-hybrid route which lets you turn any non-hybrid tracing into a hybrid tracing

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • create a non-hybrid explorational tracing and then send a PATCH request to http://localhost:9000/api/annotations/Explorational/:id/makeHybrid
  • reload tracing
  • tracing should now be a hybrid tracing

Issues:


- [ ] Updated changelog
- [ ] Updated migration guide if applicable
- [ ] Updated documentation if applicable
- [ ] Needs datastore update after deployment

  • Ready for review

@youri-k youri-k self-assigned this Oct 5, 2018
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

LGTM! Just one thing…

@@ -150,6 +150,18 @@ class AnnotationController @Inject()(annotationDAO: AnnotationDAO,
}
}

def makeHybrid(typ: String, id: String) = sil.SecuredAction.async { implicit request =>
for {
_ <- bool2Fox(AnnotationType.Explorational.toString == typ) ?~> "make hybrid only for explorationals"
Copy link
Member

Choose a reason for hiding this comment

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

would be cool if you could use the messages file for the error strings

@fm3 fm3 merged commit b673829 into master Oct 9, 2018
@fm3 fm3 deleted the hybrid-conversion branch October 9, 2018 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants