MCPcopy Create free account
hub / github.com/53AI/53AIHub / LoadIsLiked

Method LoadIsLiked

api/model/prompt.go:211–219  ·  view source on GitHub ↗
(UserId int64)

Source from the content-addressed store, hash-verified

209}
210
211func (p *Prompt) LoadIsLiked(UserId int64) error {
212 like, err := GetLikeByUserObject(UserId, ResourceTypePrompt, p.PromptID)
213 if err != nil {
214 p.IsLiked = false
215 return nil
216 }
217 p.IsLiked = like != nil && like.Status == LikeStatusActive
218 return nil
219}

Callers 2

GetPromptsFunction · 0.80
GetPromptFunction · 0.80

Calls 1

GetLikeByUserObjectFunction · 0.85

Tested by

no test coverage detected