package app

import (
	"context"
	"pinned_message/internal/services"
	proto "pinned_message/proto"
)

type Server struct {
	proto.UnimplementedPinnedMessageServer
	services *services.Services
}

func NewServer(
	services *services.Services,
) *Server {
	return &Server{
		services: services,
	}
}

func (s *Server) Ping(_ context.Context, _ *proto.PingReq) (*proto.PingRsp, error) {
	return &proto.PingRsp{}, nil
}

func (s *Server) GetDays(ctx context.Context, req *proto.GetDaysReq) (*proto.GetDaysRsp, error) {
	return s.services.GetDays(ctx, req)
}
