fix set setting in database and add option to /api/get endpoint