add the db persistence to the endpoint