Add start-now button for train-classifier task

This commit is contained in:
Eike Kettner
2020-09-01 23:56:57 +02:00
parent 8677eca6d4
commit f9fcee81a5
6 changed files with 115 additions and 15 deletions

View File

@ -88,6 +88,12 @@ object CollectiveRoutes {
resp <- Ok(ContactList(res.map(Conversions.mkContact)))
} yield resp
case POST -> Root / "classifier" / "startonce" =>
for {
_ <- backend.collective.startLearnClassifier(user.account.collective)
resp <- Ok(BasicResult(true, "Task submitted"))
} yield resp
case GET -> Root =>
for {
collDb <- backend.collective.find(user.account.collective)