add "reading" filter for books currently being read
This commit is contained in:
10
demodata.sql
10
demodata.sql
@@ -32,12 +32,14 @@ INSERT INTO static_files(name, path) VALUES ('lemeurtredotsuya.jpg', 'lemeurtred
|
|||||||
INSERT INTO static_files(name, path) VALUES ('dojoji.jpg', 'dojoji.jpg');
|
INSERT INTO static_files(name, path) VALUES ('dojoji.jpg', 'dojoji.jpg');
|
||||||
INSERT INTO static_files(name, path) VALUES ('noisy.jpg', 'noisy.jpg');
|
INSERT INTO static_files(name, path) VALUES ('noisy.jpg', 'noisy.jpg');
|
||||||
INSERT INTO static_files(name, path) VALUES ('iliade.jpeg', 'iliade.jpeg');
|
INSERT INTO static_files(name, path) VALUES ('iliade.jpeg', 'iliade.jpeg');
|
||||||
|
INSERT INTO static_files(name, path) VALUES ('Recherches-philosophiques.jpg', 'Recherches-philosophiques.jpg');
|
||||||
|
INSERT INTO static_files(name, path) VALUES ('le_chateau.jpg', 'le_chateau.jpg');
|
||||||
|
|
||||||
-- books
|
-- books
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'O dingos, o chateaux!','Jean-Patrick Manchette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'odingosochateaux.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'O dingos, o chateaux!','Jean-Patrick Manchette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'odingosochateaux.jpg'));
|
||||||
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'O dingos, o chateaux!'), true,7);
|
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'O dingos, o chateaux!'), true,7);
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Le petit bleu de la côte Ouest','Jean-Patrick Manchette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'le-petit-bleu-de-la-cote-ouest.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Le petit bleu de la côte Ouest','Jean-Patrick Manchette', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'le-petit-bleu-de-la-cote-ouest.jpg'));
|
||||||
INSERT INTO user_books(created_at, user_id, book_id, want_read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le petit bleu de la côte Ouest'), true,7);
|
INSERT INTO user_books(created_at, user_id, book_id, want_read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le petit bleu de la côte Ouest'), true,0);
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'D''un château l''autre','Louis-Ferdinand Céline', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'dunchateaulautre.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'D''un château l''autre','Louis-Ferdinand Céline', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'dunchateaulautre.jpg'));
|
||||||
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'D''un château l''autre'), true,10);
|
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'D''un château l''autre'), true,10);
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Les dieux ont soif','Anatole France', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lesdieuxontsoif.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Les dieux ont soif','Anatole France', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lesdieuxontsoif.jpg'));
|
||||||
@@ -47,7 +49,7 @@ INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW'
|
|||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Un barrage contre le Pacifique','Marguerite Duras', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Un_barrage_contre_le_Pacifique.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Un barrage contre le Pacifique','Marguerite Duras', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Un_barrage_contre_le_Pacifique.jpg'));
|
||||||
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Un barrage contre le Pacifique'), true,7);
|
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Un barrage contre le Pacifique'), true,7);
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Salammbô','Flaubert Gustave', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'salammbo.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Salammbô','Flaubert Gustave', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'salammbo.jpg'));
|
||||||
INSERT INTO user_books(created_at, user_id, book_id, want_read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Salammbô'), true,8);
|
INSERT INTO user_books(created_at, user_id, book_id, want_read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Salammbô'), true,0);
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Langage Machine','Romain Lucazeau', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Langage Machine.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Langage Machine','Romain Lucazeau', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Langage Machine.jpg'));
|
||||||
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Langage Machine'), true,5);
|
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Langage Machine'), true,5);
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'La Ville et les chiens','Mario Vargas Llosa', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lavilleetleschiens.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'La Ville et les chiens','Mario Vargas Llosa', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'lavilleetleschiens.jpg'));
|
||||||
@@ -91,3 +93,7 @@ INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW'
|
|||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Noisy outlaws, unfriendly blobs, and some other things that aren''t as scary, maybe, depending on how you feel about lost lands, stray cellphones, creatures from the sky, parents who disappear in Peru, a man named Lars Farf, and one other story we couldn''t quite finish, so maybe you could help us out','Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepf', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'noisy.jpg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Noisy outlaws, unfriendly blobs, and some other things that aren''t as scary, maybe, depending on how you feel about lost lands, stray cellphones, creatures from the sky, parents who disappear in Peru, a man named Lars Farf, and one other story we couldn''t quite finish, so maybe you could help us out','Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepf', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'noisy.jpg'));
|
||||||
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Noisy outlaws, unfriendly blobs, and some other things that aren''t as scary, maybe, depending on how you feel about lost lands, stray cellphones, creatures from the sky, parents who disappear in Peru, a man named Lars Farf, and one other story we couldn''t quite finish, so maybe you could help us out'),true,2);
|
INSERT INTO user_books(created_at, user_id, book_id, read, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Noisy outlaws, unfriendly blobs, and some other things that aren''t as scary, maybe, depending on how you feel about lost lands, stray cellphones, creatures from the sky, parents who disappear in Peru, a man named Lars Farf, and one other story we couldn''t quite finish, so maybe you could help us out'),true,2);
|
||||||
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Iliade','Homère', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'iliade.jpeg'));
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Iliade','Homère', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'iliade.jpeg'));
|
||||||
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Recherches philosophiques','Ludwig Wittgenstein', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'Recherches-philosophiques.jpg'));
|
||||||
|
INSERT INTO user_books(created_at, user_id, book_id, start_read_date, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Recherches philosophiques'), '2025-11-22 00:00:00+00:00',0);
|
||||||
|
INSERT INTO books(created_at, title, author, added_by_id, cover_id) VALUES ('NOW', 'Le château','Franz Kafka', (SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM static_files WHERE name = 'le_chateau.jpg'));
|
||||||
|
INSERT INTO user_books(created_at, user_id, book_id, start_read_date, rating) VALUES ('NOW',(SELECT id FROM users WHERE name = 'demo'),(SELECT id FROM books WHERE title = 'Le château'), '2025-10-30 00:00:00+00:00',0);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import Pagination from './Pagination.vue'
|
|||||||
const FilterStates = Object.freeze({
|
const FilterStates = Object.freeze({
|
||||||
READ: "read",
|
READ: "read",
|
||||||
WANTREAD: "wantread",
|
WANTREAD: "wantread",
|
||||||
|
READING: "reading",
|
||||||
});
|
});
|
||||||
|
|
||||||
const limit = 6;
|
const limit = 6;
|
||||||
@@ -58,6 +59,11 @@ function pageChange(newPageNumber) {
|
|||||||
:class="computeDynamicClass(FilterStates.READ)">
|
:class="computeDynamicClass(FilterStates.READ)">
|
||||||
{{$t('bookbrowser.read')}}
|
{{$t('bookbrowser.read')}}
|
||||||
</button>
|
</button>
|
||||||
|
<button class="button is-medium"
|
||||||
|
@click="onFilterButtonClick(FilterStates.READING)"
|
||||||
|
:class="computeDynamicClass(FilterStates.READING)">
|
||||||
|
{{$t('bookbrowser.reading')}}
|
||||||
|
</button>
|
||||||
<button class="button is-medium"
|
<button class="button is-medium"
|
||||||
@click="onFilterButtonClick(FilterStates.WANTREAD)"
|
@click="onFilterButtonClick(FilterStates.WANTREAD)"
|
||||||
:class="computeDynamicClass(FilterStates.WANTREAD)">
|
:class="computeDynamicClass(FilterStates.WANTREAD)">
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"error": "Error when loading books: {error}",
|
"error": "Error when loading books: {error}",
|
||||||
"loading": "Loading...",
|
"loading": "Loading...",
|
||||||
"read": "Read",
|
"read": "Read",
|
||||||
|
"reading": "Reading",
|
||||||
"wantread": "To read"
|
"wantread": "To read"
|
||||||
},
|
},
|
||||||
"searchbook": {
|
"searchbook": {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"error": "Erreur pendant le chargement des livres: {error}",
|
"error": "Erreur pendant le chargement des livres: {error}",
|
||||||
"loading": "Chargement...",
|
"loading": "Chargement...",
|
||||||
"read": "Lu",
|
"read": "Lu",
|
||||||
|
"reading": "En cours",
|
||||||
"wantread": "À lire"
|
"wantread": "À lire"
|
||||||
},
|
},
|
||||||
"searchbook": {
|
"searchbook": {
|
||||||
|
|||||||
@@ -52,3 +52,22 @@ func TestGetWantReadBooksCountHandler_Demo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
assert.Equal(t, 2, c.Count)
|
assert.Equal(t, 2, c.Count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGetReadingBooksCountHandler_Demo(t *testing.T) {
|
||||||
|
router := testutils.TestSetup()
|
||||||
|
|
||||||
|
token := testutils.ConnectDemoUser(router)
|
||||||
|
|
||||||
|
req, _ := http.NewRequest("GET", "/mybooks/reading/count", nil)
|
||||||
|
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
|
||||||
|
|
||||||
|
w := httptest.NewRecorder()
|
||||||
|
router.ServeHTTP(w, req)
|
||||||
|
|
||||||
|
var c countResponse
|
||||||
|
err := json.Unmarshal(w.Body.Bytes(), &c)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
assert.Equal(t, 2, c.Count)
|
||||||
|
}
|
||||||
|
|||||||
44
internal/apitest/get_reading_user_book_test.go
Normal file
44
internal/apitest/get_reading_user_book_test.go
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
package apitest
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/url"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"git.artlef.fr/PersonalLibraryManager/internal/testutils"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGetReadingBooksHandler_Demo(t *testing.T) {
|
||||||
|
router := testutils.TestSetup()
|
||||||
|
|
||||||
|
token := testutils.ConnectDemoUser(router)
|
||||||
|
books := testGetReadingBooksHandler(t, router, token, 200, "", "")
|
||||||
|
assert.Equal(t, 2, len(books))
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetReadingBooksHandler_Demo2(t *testing.T) {
|
||||||
|
router := testutils.TestSetup()
|
||||||
|
|
||||||
|
token := testutils.ConnectDemo2User(router)
|
||||||
|
books := testGetReadingBooksHandler(t, router, token, 200, "", "")
|
||||||
|
assert.Equal(t, 0, len(books))
|
||||||
|
}
|
||||||
|
|
||||||
|
func testGetReadingBooksHandler(t *testing.T, router *gin.Engine, userToken string, expectedCode int, limit string, offset string) []bookUserGet {
|
||||||
|
u, err := url.Parse("/mybooks/reading")
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
if limit != "" {
|
||||||
|
q := u.Query()
|
||||||
|
q.Set("limit", limit)
|
||||||
|
u.RawQuery = q.Encode()
|
||||||
|
}
|
||||||
|
if offset != "" {
|
||||||
|
q := u.Query()
|
||||||
|
q.Set("offset", offset)
|
||||||
|
u.RawQuery = q.Encode()
|
||||||
|
}
|
||||||
|
return testGetbooksHandler(t, router, userToken, expectedCode, u.String())
|
||||||
|
}
|
||||||
@@ -97,11 +97,32 @@ func FetchReadUserBookCount(db *gorm.DB, userId uint) (int64, error) {
|
|||||||
return count, res.Error
|
return count, res.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func FetchReadingUserBook(db *gorm.DB, userId uint, limit int, offset int) ([]BookUserGet, error) {
|
||||||
|
var books []BookUserGet
|
||||||
|
query := fetchReadingUserBookQuery(db, userId)
|
||||||
|
query = query.Limit(limit)
|
||||||
|
query = query.Offset(offset)
|
||||||
|
res := query.Find(&books)
|
||||||
|
return books, res.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func FetchReadingUserBookCount(db *gorm.DB, userId uint) (int64, error) {
|
||||||
|
query := fetchReadingUserBookQuery(db, userId)
|
||||||
|
var count int64
|
||||||
|
res := query.Count(&count)
|
||||||
|
return count, res.Error
|
||||||
|
}
|
||||||
|
|
||||||
func fetchReadUserBookQuery(db *gorm.DB, userId uint) *gorm.DB {
|
func fetchReadUserBookQuery(db *gorm.DB, userId uint) *gorm.DB {
|
||||||
query := fetchUserBookGet(db, userId)
|
query := fetchUserBookGet(db, userId)
|
||||||
query = query.Where("user_books.read IS TRUE")
|
query = query.Where("user_books.read IS TRUE")
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
|
func fetchReadingUserBookQuery(db *gorm.DB, userId uint) *gorm.DB {
|
||||||
|
query := fetchUserBookGet(db, userId)
|
||||||
|
query = query.Where("user_books.start_read_date IS NOT NULL")
|
||||||
|
return query
|
||||||
|
}
|
||||||
|
|
||||||
func FetchWantReadUserBook(db *gorm.DB, userId uint, limit int, offset int) ([]BookUserGet, error) {
|
func FetchWantReadUserBook(db *gorm.DB, userId uint, limit int, offset int) ([]BookUserGet, error) {
|
||||||
var books []BookUserGet
|
var books []BookUserGet
|
||||||
|
|||||||
48
internal/routes/userbookreadingget.go
Normal file
48
internal/routes/userbookreadingget.go
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
package routes
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"git.artlef.fr/PersonalLibraryManager/internal/appcontext"
|
||||||
|
"git.artlef.fr/PersonalLibraryManager/internal/myvalidator"
|
||||||
|
"git.artlef.fr/PersonalLibraryManager/internal/query"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetMyBooksReadingHandler(ac appcontext.AppContext) {
|
||||||
|
user, err := ac.GetAuthenticatedUser()
|
||||||
|
if err != nil {
|
||||||
|
myvalidator.ReturnErrorsAsJsonResponse(&ac, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
limit, err := ac.GetQueryLimit()
|
||||||
|
if err != nil {
|
||||||
|
myvalidator.ReturnErrorsAsJsonResponse(&ac, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
offset, err := ac.GetQueryOffset()
|
||||||
|
if err != nil {
|
||||||
|
myvalidator.ReturnErrorsAsJsonResponse(&ac, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
userbooks, err := query.FetchReadingUserBook(ac.Db, user.ID, limit, offset)
|
||||||
|
if err != nil {
|
||||||
|
myvalidator.ReturnErrorsAsJsonResponse(&ac, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ac.C.JSON(http.StatusOK, userbooks)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetMyBooksReadingCountHandler(ac appcontext.AppContext) {
|
||||||
|
user, err := ac.GetAuthenticatedUser()
|
||||||
|
if err != nil {
|
||||||
|
myvalidator.ReturnErrorsAsJsonResponse(&ac, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
count, err := query.FetchReadingUserBookCount(ac.Db, user.ID)
|
||||||
|
if err != nil {
|
||||||
|
myvalidator.ReturnErrorsAsJsonResponse(&ac, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ac.C.JSON(http.StatusOK, gin.H{"count": count})
|
||||||
|
}
|
||||||
@@ -30,6 +30,12 @@ func Setup(config *config.Config) *gin.Engine {
|
|||||||
r.GET("/mybooks/read/count", func(c *gin.Context) {
|
r.GET("/mybooks/read/count", func(c *gin.Context) {
|
||||||
routes.GetMyBooksReadCountHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
|
routes.GetMyBooksReadCountHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
|
||||||
})
|
})
|
||||||
|
r.GET("/mybooks/reading", func(c *gin.Context) {
|
||||||
|
routes.GetMyBooksReadingHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
|
||||||
|
})
|
||||||
|
r.GET("/mybooks/reading/count", func(c *gin.Context) {
|
||||||
|
routes.GetMyBooksReadingCountHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
|
||||||
|
})
|
||||||
r.GET("/mybooks/wantread", func(c *gin.Context) {
|
r.GET("/mybooks/wantread", func(c *gin.Context) {
|
||||||
routes.GetMyBooksWantReadHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
|
routes.GetMyBooksWantReadHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user