admin: Insert $team assignee in db automatically
This commit is contained in:
parent
f5941dcece
commit
abf0715dbf
4 changed files with 37 additions and 32 deletions
|
|
@ -171,11 +171,11 @@ func clearClaims(_ httprouter.Params, _ []byte) (interface{}, error) {
|
|||
|
||||
func generateTeamIssuesFile(team fic.Team) error {
|
||||
if my, err := team.MyIssueFile(); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("Unable to generate issue FILE (tid=%d): %w", team.Id, err)
|
||||
} else if j, err := json.Marshal(my); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("Unable to encode issues' file JSON: %w", err)
|
||||
} else if err = ioutil.WriteFile(path.Join(TeamsDir, fmt.Sprintf("%d", team.Id), "issues.json"), j, 0644); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("Unable to write issues' file: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue