Introducing new PKI management
This commit is contained in:
parent
5b558bcf00
commit
c118035c33
19 changed files with 857 additions and 53 deletions
|
@ -143,15 +143,33 @@ func treat(raw_path string) {
|
|||
if len(spath) == 3 {
|
||||
if spath[1] == "_registration" {
|
||||
treatRegistration(raw_path, spath[2])
|
||||
} else if teamid, err := strconv.Atoi(spath[1]); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
var team fic.Team
|
||||
|
||||
if strings.HasPrefix(spath[1], "_AUTH_ID_") {
|
||||
if serial, err := strconv.ParseInt(strings.TrimPrefix(spath[1], "_AUTH_ID_"), 16, 64); err != nil {
|
||||
log.Println("[ERR]", err)
|
||||
return
|
||||
} else if team, err = fic.GetTeamBySerial(serial); err != nil {
|
||||
log.Println("[ERR]", err)
|
||||
return
|
||||
}
|
||||
} else if teamid, err := strconv.ParseInt(spath[1], 10, 64); err != nil {
|
||||
log.Println("[ERR]", err)
|
||||
} else if team, err := fic.GetTeam(teamid); err != nil {
|
||||
return
|
||||
} else if team, err = fic.GetTeam(teamid); err != nil {
|
||||
log.Println("[ERR]", err)
|
||||
} else if spath[2] == "name" {
|
||||
return
|
||||
}
|
||||
|
||||
switch spath[2] {
|
||||
case "name":
|
||||
treatRename(raw_path, team)
|
||||
} else if spath[2] == "hint" {
|
||||
case "hint":
|
||||
treatOpeningHint(raw_path, team)
|
||||
} else {
|
||||
default:
|
||||
treatSubmission(raw_path, team, spath[2])
|
||||
}
|
||||
} else {
|
||||
|
|
Reference in a new issue