Add middleware to routes

Signed-off-by: Ian Macalinao <me@ian.pw>