You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
435 B

package reservation
import (
"context"
"practice_Go/api/reservation/v1"
"practice_Go/internal/dao"
)
func (c *ControllerV1) DeleteReservation(ctx context.Context, req *v1.DeleteReservationReq) (res *v1.DeleteReservationRes, err error) {
res = &v1.DeleteReservationRes{}
_, err = dao.GoLiveReservations.Ctx(ctx).Wheref("live_id =? and user_id =?", req.Id, req.UserId).Delete()
if err == nil {
res.Success = true
}
return
}