split off app.post actions into separate methods. these will be used by app.put and app.delete