Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.2 kB
2
Indexable
Never
GET /tasks
User Token required

GET /tasks/list
AdminEditorToken Required 
List all tasks for admin panel

POST /tasks/new
AdminEditorToken required
BODY: {
    title: String,
    gem: total gems for this task group : Number | Float,
    disabled: Boolean (default false midam hata age nafresti)
    tasks: array: [
        {
            image: fileLink,
            text: subtask title,
            alway: Boolean
            timer: Number
        }
    ]
}

POST /tasks/done
userToken required
Body: {
    image: fileLink (User screenshot file Link)
    subtaskId: _id of the task ( tooye response har task mifresteam)
}

POST /tasks/duplicate/:id
adminEditorToken Required
params: {
    id: url parameter (taskGroup _id)
}

PATCH /tasks/edit/:id
adminEditorToken required
params: {
    id: url param (taskGroup _id)
}

DELETE /tasks/remove/:id
adminEditorToken required
params: {
    id: url param (taskGroup _id)
}

GET /tasks/upload
AdminEditorToken Required
query: {
    name: required (ye chizi befrest dige file.png masalan)
}

GET /tasks/upload-screenshot
userToken required
query: {
    name: required (ye chizi befrest dige file.png masalan)
}