// This is a handler which checks the POST for the data required to // make a change to the database. // // This function will have one of two possible side effects which are // writing a JSON response to the caller. func ChangeTable(self *ss.AppServer, w http.ResponseWriter, req *http.Request) error { job, err := ss.NewAsyncJob(req) if err != nil { ss.SendJSON(w, false) return err } err = self.WriteEntry(job) if err != nil { ss.SendJSON(w, false) return err } ss.SendJSON(w, true) return nil }