introduce switchroute: middleware that makes sure route switches will lead to somewhere
disable gorm's ugly logger
remove unnecessary parameter
add tests for post publishing and updating