Added basic endpoint for writing to DB