mirror of
https://github.com/pikami/scrummie-poker.git
synced 2026-06-08 13:27:20 +01:00
Fix issues with newly created estimation
This commit is contained in:
@@ -36,13 +36,17 @@ const mapEstimationSession = (
|
|||||||
data: DatabaseModels.EstimationSession,
|
data: DatabaseModels.EstimationSession,
|
||||||
{ userId }: { userId?: string },
|
{ userId }: { userId?: string },
|
||||||
) => {
|
) => {
|
||||||
const sessionState = JSON.parse(
|
const sessionState: EntityModels.SessionState = data.sessionState
|
||||||
data.sessionState,
|
? JSON.parse(data.sessionState)
|
||||||
) as EntityModels.SessionState;
|
: {
|
||||||
|
votes: [],
|
||||||
|
};
|
||||||
|
|
||||||
const tickets = data.tickets.map<EntityModels.EstimationSessionTicket>(
|
const tickets = data.tickets
|
||||||
(ticket) => JSON.parse(ticket),
|
? data.tickets.map<EntityModels.EstimationSessionTicket>((ticket) =>
|
||||||
);
|
JSON.parse(ticket),
|
||||||
|
)
|
||||||
|
: [];
|
||||||
|
|
||||||
const result: EntityModels.EstimationSession = {
|
const result: EntityModels.EstimationSession = {
|
||||||
id: data.$id,
|
id: data.$id,
|
||||||
|
|||||||
Reference in New Issue
Block a user