Fix server routing to handle getAllPosts with undefined, unauthenticated user