Added rating to performers and studios (#1308)

This commit is contained in:
julien0221
2021-04-26 04:48:32 +01:00
committed by GitHub
parent eefc628cf0
commit 70b66d91a0
39 changed files with 438 additions and 25 deletions

View File

@@ -209,6 +209,14 @@ func (r *performerResolver) StashIds(ctx context.Context, obj *models.Performer)
return ret, nil
}
func (r *performerResolver) Rating(ctx context.Context, obj *models.Performer) (*int, error) {
if obj.Rating.Valid {
rating := int(obj.Rating.Int64)
return &rating, nil
}
return nil, nil
}
func (r *performerResolver) Details(ctx context.Context, obj *models.Performer) (*string, error) {
if obj.Details.Valid {
return &obj.Details.String, nil