Added some comments

This commit is contained in:
Eduard Urbach 2017-11-20 08:56:37 +01:00
parent b1a12b83ac
commit 5bab3cf753

View File

@ -42,9 +42,12 @@ func main() {
log.Fatal(http.ListenAndServe(":"+port, nil))
}
// onRequest handles requests and refreshes the requested avatar
// onRequest handles requests and refreshes the requested avatar.
func onRequest(w http.ResponseWriter, req *http.Request) {
// User ID is simply the path without the slash
userID := strings.TrimPrefix(req.URL.Path, "/")
// Get user from database
user, err := arn.GetUser(userID)
if err != nil {