token-validator: upload SSH key automatically validate latest challenge
This commit is contained in:
parent
7bfed9dc89
commit
de1492e1db
@ -236,6 +236,7 @@ func init() {
|
||||
Check: challengeDisk,
|
||||
},
|
||||
|
||||
/* Last : SSH key, see ssh.go:156 in NewKey function */
|
||||
}
|
||||
|
||||
router.GET("/challenge", apiHandler(getChallengeList))
|
||||
|
@ -153,6 +153,7 @@ func (s Student) NewKey(key string) (k StudentKey, err error) {
|
||||
} else if kid, err := res.LastInsertId(); err != nil {
|
||||
return StudentKey{}, err
|
||||
} else {
|
||||
s.UnlockNewChallenge(len(challenges), "")
|
||||
return StudentKey{kid, s.Id, key, time.Now()}, nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user