ai scenarios start
This commit is contained in:
@@ -85,5 +85,12 @@ func (rep *RPRepository) GetPreset(id string) (*RPGeneralPreset, error) {
|
||||
}
|
||||
|
||||
func (rep *RPRepository) GetAllScenarios() ([]*RPScenarios, error) {
|
||||
return nil, nil
|
||||
scenarios := make([]*RPScenarios, 0)
|
||||
err := rep.db.Select(&scenarios, "SELECT * FROM rp_scenarios;")
|
||||
return scenarios, err
|
||||
}
|
||||
func (rep *RPRepository) GetScenario(id int) (*RPScenarios, error) {
|
||||
scenario := new(RPScenarios)
|
||||
err := rep.db.Select(scenario, "SELECT * FROM rp_scenarios WHERE id=$1;", id)
|
||||
return scenario, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user