fix
This commit is contained in:
parent
1ecbce4b16
commit
014af81a92
@ -693,8 +693,8 @@ func (h *OgentHandler) UpdateMa(ctx context.Context, req *UpdateMaReq, params Up
|
|||||||
|
|
||||||
// DeleteMa handles DELETE /mas/{id} requests.
|
// DeleteMa handles DELETE /mas/{id} requests.
|
||||||
func (h *OgentHandler) DeleteMa(ctx context.Context, params DeleteMaParams) (DeleteMaRes, error) {
|
func (h *OgentHandler) DeleteMa(ctx context.Context, params DeleteMaParams) (DeleteMaRes, error) {
|
||||||
err := h.client.Ma.DeleteOneID(0).Exec(ctx)
|
//err := h.client.Ma.DeleteOneID(0).Exec(ctx)
|
||||||
//err := h.client.Ma.DeleteOneID(params.ID).Exec(ctx)
|
err := h.client.Ma.DeleteOneID(params.ID).Exec(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
switch {
|
switch {
|
||||||
case ent.IsNotFound(err):
|
case ent.IsNotFound(err):
|
||||||
|
@ -693,8 +693,8 @@ func (h *OgentHandler) UpdateMa(ctx context.Context, req *UpdateMaReq, params Up
|
|||||||
|
|
||||||
// DeleteMa handles DELETE /mas/{id} requests.
|
// DeleteMa handles DELETE /mas/{id} requests.
|
||||||
func (h *OgentHandler) DeleteMa(ctx context.Context, params DeleteMaParams) (DeleteMaRes, error) {
|
func (h *OgentHandler) DeleteMa(ctx context.Context, params DeleteMaParams) (DeleteMaRes, error) {
|
||||||
err := h.client.Ma.DeleteOneID(0).Exec(ctx)
|
//err := h.client.Ma.DeleteOneID(0).Exec(ctx)
|
||||||
//err := h.client.Ma.DeleteOneID(params.ID).Exec(ctx)
|
err := h.client.Ma.DeleteOneID(params.ID).Exec(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
switch {
|
switch {
|
||||||
case ent.IsNotFound(err):
|
case ent.IsNotFound(err):
|
||||||
|
Loading…
Reference in New Issue
Block a user