You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
701 B
20 lines
701 B
package handler
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/TremblingV5/DouTok/applications/favorite/misc"
|
|
"github.com/TremblingV5/DouTok/applications/favorite/pack"
|
|
"github.com/TremblingV5/DouTok/applications/favorite/service"
|
|
"github.com/TremblingV5/DouTok/kitex_gen/favorite"
|
|
)
|
|
|
|
func (s *FavoriteServiceImpl) IsFavorite(ctx context.Context, req *favorite.DouyinIsFavoriteRequest) (resp *favorite.DouyinIsFavoriteResponse, err error) {
|
|
res, err := service.QueryIsFavorite(req.UserId, req.VideoIdList)
|
|
|
|
if err != nil {
|
|
return pack.PackIsFavoriteResp(int32(misc.SystemErr.ErrCode), misc.SystemErr.ErrMsg, nil)
|
|
}
|
|
|
|
return pack.PackIsFavoriteResp(int32(misc.Success.ErrCode), misc.Success.ErrMsg, res)
|
|
}
|
|
|