Protect the routes

Your task In the code box, write userFrom(req) and use it in GET /notes (only the user's notes, by id) and POST /notes (saved for the user in the token, 201 with { id, text }). Without a valid token both answer 401 with { "error": "Sign in first" }. Then press Run my code.

Getting the editor ready