File tree 1 file changed +3
-16
lines changed
1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,11 @@ package db
2
2
3
3
import (
4
4
"github.com/Mangatsu/server/internal/config"
5
- "github.com/Mangatsu/server/pkg/types/ model"
5
+ "github.com/Mangatsu/server/pkg/model"
6
6
"github.com/doug-martin/goqu/v9"
7
7
log "github.com/sirupsen/logrus"
8
8
)
9
9
10
- // FIXME: it won't work yet!! CombinedLibrary has to be a plain struct,
11
- // something like this:
12
- //
13
- // type User struct {
14
- // FirstName string `db:"first_name"`
15
- // LastName string `db:"last_name"`
16
- // }
17
-
18
- type CombinedLibrary struct {
19
- model.Library
20
- Galleries []model.Gallery
21
- }
22
-
23
10
func StorePaths (givenLibraries []config.Library ) error {
24
11
for _ , library := range givenLibraries {
25
12
libraries , err := getLibrary (library .ID , "" )
@@ -54,8 +41,8 @@ func GetOnlyLibraries() ([]model.Library, error) {
54
41
return libraries , err
55
42
}
56
43
57
- func GetLibraries () ([]CombinedLibrary , error ) {
58
- var libraries []CombinedLibrary
44
+ func GetLibraries () ([]model. CombinedLibrary , error ) {
45
+ var libraries []model. CombinedLibrary
59
46
err := database .QB ().
60
47
From ("library" ).
61
48
LeftJoin (
You can’t perform that action at this time.
0 commit comments