mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Add SQLite persistence, import-snapshot tool, and karma functionality
This commit is contained in:
@@ -11,15 +11,15 @@ import (
|
||||
|
||||
type BannerServiceServer struct {
|
||||
pb.UnimplementedBannerServiceServer
|
||||
gacha store.GachaRepository
|
||||
catalog []store.GachaCatalogEntry
|
||||
}
|
||||
|
||||
func NewBannerServiceServer(gacha store.GachaRepository) *BannerServiceServer {
|
||||
return &BannerServiceServer{gacha: gacha}
|
||||
func NewBannerServiceServer(catalog []store.GachaCatalogEntry) *BannerServiceServer {
|
||||
return &BannerServiceServer{catalog: catalog}
|
||||
}
|
||||
|
||||
func (s *BannerServiceServer) GetMamaBanner(ctx context.Context, req *pb.GetMamaBannerRequest) (*pb.GetMamaBannerResponse, error) {
|
||||
catalog, _ := s.gacha.SnapshotCatalog()
|
||||
catalog := s.catalog
|
||||
var termLimited []*pb.GachaBanner
|
||||
var latestChapter *pb.GachaBanner
|
||||
for _, entry := range catalog {
|
||||
|
||||
Reference in New Issue
Block a user