lexicongovernance / pluraltools-backend

Backend implementation of the plural voting tool.
https://demo.lexicongovernance.org/
GNU General Public License v3.0
3 stars 1 forks source link

Get authors of secret groups #353

Closed MartinBenediktBusch closed 3 months ago

MartinBenediktBusch commented 3 months ago

This PR implements the functionality to retrieve the authors and co-authors of a secret group for a given question option. This information will be included in the comments page and or vote page.

The output looks like this:

{
      optionId: '842bc51d-9d79-4b56-9ed0-6f396a43281b',
      registrationId: '6aa5082b-090a-48ec-b4e0-61edce72e727',
      groupId: '0cdc5cec-d6ef-4636-8c7c-3f9a6d92654d',
      usersInGroup: [
        {
          id: 'dabab499-af68-4ad9-964e-41536f62fb73',
          username: 'Irina.Huber24',
          firstName: null,
          lastName: null
        },
        {
          id: '035a9d59-e517-409f-a72c-8d771cf22ccf',
          username: 'Pilar.Saeli',
          firstName: null,
          lastName: null
        }
      ]
    }
MartinBenediktBusch commented 3 months ago

updated response object:

{
      "optionId": "d09a570f-5996-466b-be99-fa8090b7a87f",
      "registrationId": "6d7dfb1e-06f0-4997-8f63-0c62090d4ee6",
      "userId": "a22d3841-646b-4872-b9b6-2561974b70fc",
      "user": {
        "id": "a22d3841-646b-4872-b9b6-2561974b70fc",
        "username": "Santosh_Scholz34",
        "firstName": "Hauwa",
        "lastName": "Cai"
      },
      "groupId": "8e12d0bd-c68f-4bc8-bcbc-fede8430fd6e",
      "group": {
        "id": "8e12d0bd-c68f-4bc8-bcbc-fede8430fd6e",
        "users": [
          {
            "id": "a22d3841-646b-4872-b9b6-2561974b70fc",
            "username": "Santosh_Scholz34",
            "firstName": "Hauwa",
            "lastName": "Cai"
          },
          {
            "id": "86082d4a-8773-4665-8708-254258f3046a",
            "username": "Janet_Nakano89",
            "firstName": "Yoshimi",
            "lastName": "Morozov"
          }
        ]
      }
    }