Merge exercices API routes
This commit is contained in:
parent
f008aac04c
commit
5111143d2a
4 changed files with 57 additions and 102 deletions
|
|
@ -78,7 +78,7 @@ func (t Theme) GetExercices() ([]Exercice, error) {
|
|||
}
|
||||
}
|
||||
|
||||
func (t Theme) AddExercice(title string, statement string, depend *Exercice, gain int, videoURI string) (Exercice, error) {
|
||||
func (t Theme) AddExercice(title string, statement string, depend *Exercice, gain int64, videoURI string) (Exercice, error) {
|
||||
var dpd interface{}
|
||||
if depend == nil {
|
||||
dpd = nil
|
||||
|
|
@ -91,9 +91,9 @@ func (t Theme) AddExercice(title string, statement string, depend *Exercice, gai
|
|||
return Exercice{}, err
|
||||
} else {
|
||||
if depend == nil {
|
||||
return Exercice{eid, title, statement, nil, int64(gain), videoURI}, nil
|
||||
return Exercice{eid, title, statement, nil, gain, videoURI}, nil
|
||||
} else {
|
||||
return Exercice{eid, title, statement, &depend.Id, int64(gain), videoURI}, nil
|
||||
return Exercice{eid, title, statement, &depend.Id, gain, videoURI}, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue