Skip to content

Add the ability to get a list of uploaded themes from a certain author #2

@caoimhebyrne

Description

@caoimhebyrne

At the moment, there is no way for the client to know if a theme that it has saved has already been published by the user. This makes the UX poor, as a user may try to publish a theme that they have already published before again, but the request will fail.

We should add an endpoint that allows the user to get the themes for a certain author.

There are two approaches to this:

  1. Any user is allowed to retrieve the list of themes for any author
    In this approach, we will create a new endpoint:

    GET /api/v1/themes/list/{uuid}

    This approach is the simplest, allowing anyone to retrieve the list of themes for any author on the MediaMod database.

  2. Any user is allowed to retrieve the list of themes for themselves
    In this approach, we will create a new endpoint:

    GET /api/v1/themes/list/{uuid}?sharedSecret=...

    This endpoint requires the user to re-authenticate with the mojang session server so that we can verify that they are the owner of the UUID that they are requesting for. This approach seems kind-of needless, but I wanted to document it here anyways.

Both endpoints would return a JSON object similar to what's shown below:

{
    "ok": true,
    "themes": [
        {
            "id": "625b31ea0f3a53d26c96a9a2",
            "name": "My Theme",
            "author": "cbyrneee",
            "upload_date":"2022-04-16T21:15:22.591Z",
            "colors": {...}
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions