Example #1
0
func updateHandle(w http.ResponseWriter, r *http.Request, s *session.Session) {
	// Probs implement TOTP, potentially vulnerable to MTM
	if s.VerifiedUpdate(r.URL.Query()["hash"][0]) {
		s.SetHashtags(strings.Split(r.URL.Query()["hashtags"][0], " "))
		s.ParseTheta(strings.Split(r.URL.Query()["theta"][0], " "))
		s.SetLearnt()
		fmt.Fprint(w, "Updated")
	} else {
		fmt.Fprint(w, "Not Verified")
	}
}