MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetByTaskId

Function GetByTaskId

model/task.go:198–211  ·  view source on GitHub ↗
(userId int, taskId string)

Source from the content-addressed store, hash-verified

196}
197
198func GetByTaskId(userId int, taskId string) (*Task, bool, error) {
199 if taskId == "" {
200 return nil, false, nil
201 }
202 var task *Task
203 var err error
204 err = DB.Where("user_id = ? and task_id = ?", userId, taskId).
205 First(&task).Error
206 exist, err := RecordExist(err)
207 if err != nil {
208 return nil, false, err
209 }
210 return task, exist, err
211}
212
213func GetByTaskIds(userId int, taskIds []any) ([]*Task, error) {
214 if len(taskIds) == 0 {

Callers 3

RelayTaskSubmitFunction · 0.92

Calls 1

RecordExistFunction · 0.85

Tested by

no test coverage detected