Backend: handle registration
This commit is contained in:
parent
1d8f9b0785
commit
d30b4946b3
2 changed files with 43 additions and 2 deletions
|
@ -105,8 +105,16 @@ func treat(raw_path string) {
|
|||
// Extract
|
||||
spath := strings.Split(strings.TrimPrefix(raw_path, SubmissionDir), "/")
|
||||
|
||||
if len(spath) > 2 {
|
||||
treatSubmission(raw_path, spath[1], spath[2])
|
||||
if len(spath) == 3 {
|
||||
if spath[1] == "_registration" {
|
||||
treatRegistration(raw_path)
|
||||
} else if team, err := fic.GetTeamByInitialName(spath[1]); err != nil {
|
||||
log.Println("[ERR]", err)
|
||||
} else if spath[2] == "name" {
|
||||
treatRename(raw_path, team)
|
||||
} else {
|
||||
treatSubmission(raw_path, team, spath[2])
|
||||
}
|
||||
} else {
|
||||
log.Println("Invalid new file:", raw_path)
|
||||
}
|
||||
|
|
Reference in a new issue