adapt on booking new struct + instance of a resource
This commit is contained in:
@@ -163,6 +163,7 @@ func (o *BookingController) Check() {
|
||||
// @Success 200 {object} models.object
|
||||
// @router / [post]
|
||||
func (o *BookingController) Post() {
|
||||
fmt.Println("POST")
|
||||
/*
|
||||
* This function is used to create a booking.
|
||||
* It takes the following parameters:
|
||||
@@ -173,7 +174,7 @@ func (o *BookingController) Post() {
|
||||
*/
|
||||
var resp booking.Booking
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
json.Unmarshal(o.Ctx.Input.CopyBody(100000), &resp)
|
||||
json.Unmarshal(o.Ctx.Input.CopyBody(10000000), &resp)
|
||||
dc_id := resp.ResourceID
|
||||
// delete all previous bookings
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
|
||||
Reference in New Issue
Block a user