Sortiere Sprechstunden und Räume alphabetisch
This commit is contained in:
parent
d28d3e21ee
commit
6241c8f391
2 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ func (r *CourseRepo) FindById(id int) (models.Course, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *CourseRepo) GetAll() ([]models.Course, error) {
|
func (r *CourseRepo) GetAll() ([]models.Course, error) {
|
||||||
rows, err := r.db.Query("SELECT * FROM course")
|
rows, err := r.db.Query("SELECT * FROM course ORDER BY name ASC")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error getting all courses: %s", err.Error())
|
log.Printf("Error getting all courses: %s", err.Error())
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -42,7 +42,7 @@ func (r *RoomRepo) FindById(id int) (models.Room, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *RoomRepo) GetAll() ([]models.Room, error) {
|
func (r *RoomRepo) GetAll() ([]models.Room, error) {
|
||||||
rows, err := r.db.Query("SELECT * FROM room")
|
rows, err := r.db.Query("SELECT * FROM room ORDER BY name ASC")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("Error getting all rooms: %w", err)
|
err = fmt.Errorf("Error getting all rooms: %w", err)
|
||||||
log.Println(err.Error())
|
log.Println(err.Error())
|
||||||
|
|
Loading…
Reference in a new issue