13 lignes
273 o
Go
13 lignes
273 o
Go
package commentService
|
|
|
|
import (
|
|
"github.com/ewhal/nyaa/db"
|
|
"github.com/ewhal/nyaa/model"
|
|
|
|
)
|
|
|
|
func GetAllComments(limit int, offset int) []model.Comment{
|
|
var comments []model.Comment
|
|
db.ORM.Limit(limit).Offset(offset).Preload("User").Find(&comments)
|
|
return comments
|
|
}
|