feat(server): return TrainingDateAttendee data on GET, POST and PUT
This commit is contained in:
parent
67f015ec97
commit
65bd079691
1 changed files with 28 additions and 6 deletions
|
|
@ -3,6 +3,7 @@ package server
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/oapi-codegen/runtime/types"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
|
@ -501,8 +502,15 @@ func (h *APIHandlers) CreateTrainingDateAttendee(ctx context.Context, req Create
|
|||
}
|
||||
|
||||
return CreateTrainingDateAttendee201JSONResponse{
|
||||
Id: ta.ID,
|
||||
Name: ta.Name,
|
||||
Id: ta.ID,
|
||||
Name: ta.Name,
|
||||
Email: types.Email(ta.Email),
|
||||
Phone: ta.Phone,
|
||||
Company: ta.Company,
|
||||
Position: ta.Position,
|
||||
IsStudent: &ta.IsStudent,
|
||||
HasAttended: ta.HasAttended,
|
||||
HasPaid: ta.HasPaid,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
@ -560,8 +568,15 @@ func (h *APIHandlers) GetTrainingDateAttendee(ctx context.Context, req GetTraini
|
|||
}
|
||||
|
||||
return GetTrainingDateAttendee200JSONResponse{
|
||||
Id: ta.ID,
|
||||
Name: ta.Name,
|
||||
Id: ta.ID,
|
||||
Name: ta.Name,
|
||||
Email: types.Email(ta.Email),
|
||||
Phone: ta.Phone,
|
||||
Company: ta.Company,
|
||||
Position: ta.Position,
|
||||
IsStudent: &ta.IsStudent,
|
||||
HasAttended: ta.HasAttended,
|
||||
HasPaid: ta.HasPaid,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
@ -582,7 +597,14 @@ func (h *APIHandlers) UpdateTrainingDateAttendee(ctx context.Context, req Update
|
|||
}
|
||||
|
||||
return UpdateTrainingDateAttendee200JSONResponse{
|
||||
Id: ta.ID,
|
||||
Name: ta.Name,
|
||||
Id: ta.ID,
|
||||
Name: ta.Name,
|
||||
Email: types.Email(ta.Email),
|
||||
Phone: ta.Phone,
|
||||
Company: ta.Company,
|
||||
Position: ta.Position,
|
||||
IsStudent: &ta.IsStudent,
|
||||
HasAttended: ta.HasAttended,
|
||||
HasPaid: ta.HasPaid,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue