db: Add cksum_shown field to files in order to store second checksum in case of gziped content
This commit is contained in:
parent
91b2daea2e
commit
6b7ed273b7
5 changed files with 40 additions and 25 deletions
|
@ -174,7 +174,11 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||
} else {
|
||||
for _, f := range files {
|
||||
if t == nil || t.CanDownload(f) {
|
||||
exercice.Files = append(exercice.Files, myTeamFile{path.Join(FilesDir, f.Path), f.Name, hex.EncodeToString(f.Checksum), f.Size})
|
||||
cksum := f.Checksum
|
||||
if len(f.ChecksumShown) > 0 {
|
||||
cksum = f.ChecksumShown
|
||||
}
|
||||
exercice.Files = append(exercice.Files, myTeamFile{path.Join(FilesDir, f.Path), f.Name, hex.EncodeToString(cksum), f.Size})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue