mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-04 18:59:13 +02:00
fix:#22 changed linting errors
This commit is contained in:
@@ -53,11 +53,14 @@ func GetAllModulesDistinct(app *pocketbase.PocketBase) ([]model.ModuleDTO, error
|
||||
}
|
||||
|
||||
func GetModuleByUUID(app *pocketbase.PocketBase, uuid string) (model.Module, error) {
|
||||
module, err := db.FindModuleByUUID(app, uuid)
|
||||
events, err := db.FindAllEventsByModule(app, module)
|
||||
module, findModuleErr := db.FindModuleByUUID(app, uuid)
|
||||
if findModuleErr != nil {
|
||||
return model.Module{}, findModuleErr
|
||||
}
|
||||
|
||||
if err != nil || len(events) == 0 {
|
||||
return model.Module{}, err
|
||||
events, findEventsError := db.FindAllEventsByModule(app, module)
|
||||
if findEventsError != nil || len(events) == 0 {
|
||||
return model.Module{}, findEventsError
|
||||
} else {
|
||||
return model.Module{
|
||||
UUID: events[0].UUID,
|
||||
|
Reference in New Issue
Block a user