QA: Add new script to migrate QA content from a DB to another

This commit is contained in:
nemunaire 2021-02-05 16:56:27 +01:00
commit f4dcaa23a3
8 changed files with 208 additions and 9 deletions

View file

@ -42,9 +42,11 @@ func apiHandler(f DispatchFunction) func(http.ResponseWriter, *http.Request, htt
} else if teamid, err = strconv.ParseInt(ficteam, 10, 64); err != nil {
if lnk, err := os.Readlink(path.Join(TeamsDir, ficteam)); err != nil {
log.Printf("[ERR] Unable to readlink %q: %s\n", path.Join(TeamsDir, ficteam), err)
http.Error(w, fmt.Sprintf("{errmsg:\"Unable to validate authentication.\"}"), http.StatusInternalServerError)
return
} else if teamid, err = strconv.ParseInt(lnk, 10, 64); err != nil {
log.Printf("[ERR] Error during ParseInt team %q: %s\n", lnk, err)
http.Error(w, fmt.Sprintf("{errmsg:\"Unable to validate authentication.\"}"), http.StatusInternalServerError)
return
}
}