Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Retrieve a Users Locked Tasks endpoint #1139

Merged
merged 8 commits into from
Aug 10, 2024

Conversation

CollinBeczak
Copy link
Contributor

@CollinBeczak CollinBeczak commented Jul 27, 2024

Adds the new endpoint:
GET /user/:userId/lockedTasks?limit={Long}

This endpoint retrieves a list of data. For each task that is locked by a user, or where the user_id in the locked table matches the requested userId, it returns the task's id, challenge id, challenge name, and the time it was locked.

Example of output:

[
    {
        "id": 50109,
        "parent": 63,
        "parentName": "Fix all roads in west Wichita",
        "startedAt": "2024-07-30T17:56:59.650-05:00"
    },
    {
        "id": 50207,
        "parent": 63,
        "parentName": "Fix all roads in west Wichita",
        "startedAt": "2024-07-29T15:40:42.664-05:00"
    },
    {
        "id": 50206,
        "parent": 63,
        "parentName": "Fix all roads in west Wichita",
        "startedAt": "2024-07-29T15:40:42.669-05:00"
    },
    {
        "id": 50210,
        "parent": 63,
        "parentName": "Fix all roads in west Wichita",
        "startedAt": "2024-07-29T15:40:42.673-05:00"
    }
]

@CollinBeczak CollinBeczak changed the title add Retrieve Users Locked Tasks endpoint add Retrieve a Users Locked Tasks endpoint Jul 27, 2024
@CollinBeczak CollinBeczak marked this pull request as ready for review July 29, 2024 20:35
app/org/maproulette/framework/model/LockedTask.scala Outdated Show resolved Hide resolved
conf/v2_route/user.api Outdated Show resolved Hide resolved
conf/v2_route/user.api Show resolved Hide resolved
conf/v2_route/user.api Show resolved Hide resolved
app/org/maproulette/framework/model/LockedTask.scala Outdated Show resolved Hide resolved
@CollinBeczak CollinBeczak marked this pull request as draft August 9, 2024 22:06
Copy link

@CollinBeczak CollinBeczak marked this pull request as ready for review August 10, 2024 00:20
@ljdelight ljdelight merged commit 9dc82e6 into main Aug 10, 2024
11 checks passed
@ljdelight ljdelight deleted the add-Retrieve-Users-Locked-Tasks-endpoint branch August 10, 2024 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants