Spaces:
Runtime error
Runtime error
Commit ·
8f4eafd
1
Parent(s): 90e41cb
Deploy files from GitHub repository
Browse files3 unmodified lines456789101112 unmodified lines24252627282930311 unmodified line33343536373839403 unmodified lines"abdanhafidz.com/go-boilerplate/models/dto"entity "abdanhafidz.com/go-boilerplate/models/entity""abdanhafidz.com/go-boilerplate/services""github.com/gin-gonic/gin""github.com/google/uuid")type AccountDetailController interface {12 unmodified lines}func (c *accountDetailController) GetDetail(ctx *gin.Context) {accStr := ctx.Query("account_id")accountId, _ := uuid.Parse(accStr)res, err := c.accountService.GetDetail(ctx.Request.Context(), accountId)ResponseJSON(ctx, gin.H{"accountId": accountId}, res, err)}1 unmodified linefunc (c *accountDetailController) UpdateDetail(ctx *gin.Context) {req := RequestJSON[dto.UpdateAccountDetailRequest](ctx)accStr := ctx.Query("account_id")accountId, _ := uuid.Parse(accStr)details := entity.AccountDetail{AccountId: accountId,3 unmodified lines456789101112 unmodified lines24252627282930311 unmodified line33343536373839403 unmodified lines"abdanhafidz.com/go-boilerplate/models/dto"entity "abdanhafidz.com/go-boilerplate/models/entity""abdanhafidz.com/go-boilerplate/services""abdanhafidz.com/go-boilerplate/utils""github.com/gin-gonic/gin")type AccountDetailController interface {12 unmodified lines}func (c *accountDetailController) GetDetail(ctx *gin.Context) {gaccountId, _ := ctx.Get("account_id")accountId, err := utils.ToUUID(gaccountId)res, err := c.accountService.GetDetail(ctx.Request.Context(), accountId)ResponseJSON(ctx, gin.H{"accountId": accountId}, res, err)}1 unmodified linefunc (c *accountDetailController) UpdateDetail(ctx *gin.Context) {req := RequestJSON[dto.UpdateAccountDetailRequest](ctx)gaccountId, _ := ctx.Get("account_id")accountId, err := utils.ToUUID(gaccountId)details := entity.AccountDetail{AccountId: accountId,
controllers/account_detail_controller.go+5-5