in app/controllers/VaultController.scala [126:140]
def singleTokenDownload(token:String) = Action.async { request=>
serverTokenDAO.get(token).flatMap({
case Some(serverToken)=>
serverTokenDAO.remove(token)
splitAssociatedIds(serverToken.associatedId) match {
case Some((vaultId, oid))=>
streamTargetContent(vaultId, oid, request, serverToken.createdForUser.getOrElse("anonymous"))
case None=>
logger.error(s"Server token $token for ${serverToken.createdForUser} was invalid, did not have vault and object IDs")
Future(NotFound(GenericErrorResponse("not_found","invalid token").asJson))
}
case None=>
Future(NotFound(GenericErrorResponse("not_found","").asJson))
})
}