1
0

test delete

This commit is contained in:
2023-05-01 23:00:17 +09:00
parent a0ac2438ed
commit 2883ab052c
22 changed files with 756 additions and 72 deletions

View File

@ -459,7 +459,7 @@ func decodeListCardParams(args [0]string, r *http.Request) (params ListCardParam
MinSet: true,
Min: 1,
MaxSet: true,
Max: 3000,
Max: 3500,
MinExclusive: false,
MaxExclusive: false,
MultipleOfSet: false,
@ -624,7 +624,7 @@ func decodeListGroupParams(args [0]string, r *http.Request) (params ListGroupPar
MinSet: true,
Min: 1,
MaxSet: true,
Max: 3000,
Max: 3500,
MinExclusive: false,
MaxExclusive: false,
MultipleOfSet: false,
@ -956,7 +956,7 @@ func decodeListUserParams(args [0]string, r *http.Request) (params ListUserParam
MinSet: true,
Min: 1,
MaxSet: true,
Max: 3000,
Max: 3500,
MinExclusive: false,
MaxExclusive: false,
MultipleOfSet: false,

View File

@ -160,6 +160,7 @@ func (h *OgentHandler) UpdateCard(ctx context.Context, req *UpdateCardReq, param
// DeleteCard handles DELETE /cards/{id} requests.
func (h *OgentHandler) DeleteCard(ctx context.Context, params DeleteCardParams) (DeleteCardRes, error) {
err := h.client.Card.DeleteOneID(0).Exec(ctx)
//err := h.client.Card.DeleteOneID(params.ID).Exec(ctx)
if err != nil {
switch {
case ent.IsNotFound(err):
@ -543,6 +544,12 @@ func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, param
if v == token {
b.SetToken(v)
// Add all fields.
if v, ok := req.Did.Get(); ok {
b.SetDid(v)
}
if v, ok := req.Delete.Get(); ok {
b.SetDelete(v)
}
if v, ok := req.UpdatedAt.Get(); ok {
b.SetUpdatedAt(v)
}