fic: Add team's external_id to allow team and score synchronisation

This commit is contained in:
nemunaire 2021-09-03 17:23:00 +02:00
commit 5c12963da8
5 changed files with 30 additions and 26 deletions

View file

@ -155,7 +155,7 @@ func createTeam(_ httprouter.Params, body []byte) (interface{}, error) {
return nil, err
}
return fic.CreateTeam(strings.TrimSpace(ut.Name), ut.Color)
return fic.CreateTeam(strings.TrimSpace(ut.Name), ut.Color, ut.ExternalId)
}
func updateTeam(team fic.Team, body []byte) (interface{}, error) {

View file

@ -1997,7 +1997,7 @@ angular.module("FICApp")
if ($scope.team && $scope.team.id)
$routeParams.teamId = $scope.team.id;
$scope.team = Team.get({ teamId: $routeParams.teamId });
$scope.fields = ["name", "color"];
$scope.fields = ["name", "color", "external_id"];
$scope.saveTeam = function() {
if (this.team.id) {