sorface / interview-platform

MIT License
0 stars 1 forks source link

Endpoint for getting question answer details #199

Closed VladislavPetyukevich closed 3 weeks ago

VladislavPetyukevich commented 1 month ago

Endpoint for getting question answer details.

GET /api/room-questions/answer Params - RoomId, QuestionId

{
  "question": {
    "codeEditor": {
      "content": "string",
      "lang": "string"
    },
    "answerCodeEditor": { // last code editor state on this question
      "content": "string", // May be return last non empty code editor value
      "lang": "string"
    }
  },
  "transcription": [ // all transcriptions for this question
    {
      "id": "guid",
      "payload": "string",
      "createdAt": "2024-08-03T10:47:04.331Z",
      "user": {
        "id": "guid",
        "nickname": "string"
      }
    }
  ]
}
blowin commented 3 weeks ago

Actual response from the backend:

{
  "codeEditor": {
    "content": "string",
    "lang": "string"
  },
  "details": [
    {
      "answerCodeEditorContent": "string",
      "transcription": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "payload": "string",
          "createdAt": "2024-09-05T11:46:30.699Z",
          "user": {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "nickname": "string"
          }
        }
      ],
      "startActiveDate": "2024-09-05T11:46:30.699Z",
      "endActiveDate": "2024-09-05T11:46:30.699Z"
    }
  ]
}
blowin commented 3 weeks ago

@VladislavPetyukevich Changed Payload in events in WebSocket: