github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/cmd/srv-applet-mgr/apis/account/put.go (about) 1 package account 2 3 import ( 4 "context" 5 6 "github.com/machinefi/w3bstream/cmd/srv-applet-mgr/apis/middleware" 7 "github.com/machinefi/w3bstream/pkg/depends/kit/httptransport/httpx" 8 "github.com/machinefi/w3bstream/pkg/modules/account" 9 ) 10 11 type UpdatePasswordByAccountID struct { 12 httpx.MethodPut `summary:"Update account password"` 13 14 account.UpdatePasswordReq `in:"body"` 15 } 16 17 func (r *UpdatePasswordByAccountID) Output(ctx context.Context) (interface{}, error) { 18 ca := middleware.MustCurrentAccountFromContext(ctx) 19 return nil, account.UpdateAccountPassword(ctx, ca.AccountID, &r.UpdatePasswordReq) 20 }