middleware between httpsqs and db-backend