Closed wintbiit closed 11 months ago
@seriouszyx @ComradeProgrammer @Resulte
@WinterOfBit yes, all SDKs need to be updated after PR: https://github.com/casdoor/casdoor/pull/2111 is merged. Can you update the Go SDK?
@WinterOfBit yes, all SDKs need to be updated after PR: casdoor/casdoor#2111 is merged. Can you update the Go SDK?
Ok. working on this now.
@WinterOfBit the PR: https://github.com/casdoor/casdoor/pull/2111 was already merged. Can you proceed with this issue now?
@WinterOfBit the PR: casdoor/casdoor#2111 was already merged. Can you proceed with this issue now?
@hsluoyz #73 altered all usages of base.go#DoGetBytesRaw() with base.go#DoGetBytes(), which seems to have solved this issue. Am I missing any APIs?
@WinterOfBit ok, then plz close this issue if resolved
after https://github.com/casdoor/casdoor/commit/a6f803aff1e634ae92b669975baa366a6b3b39c8, casdoor-go-sdk codes like
No longer works (return empty struct / panic) because response format has changed from data model alone to wrapped response json. Take the user.go#GetUser() above as example.
Before https://github.com/casdoor/casdoor/commit/a6f803aff1e634ae92b669975baa366a6b3b39c8
/api/get-user
returns just user modal.Then after it returns standard reponse modal in which user modal is wrapped in
data
field.Quite a lot apis in casdoor-go-sdk has been influenced, such as user.go, resource.go...... Almost anywhere code like
encounters this.
By the way I noticed that actually
DoGetBytesRaw()
already unmarshaled response bytes to standard response data modal and then return the original reponse bytes. Maybe changing this would help.Maybe more sdks like java-sdk, js-sdk or rust-sdk also have this issue, are the next steps of https://github.com/casdoor/casdoor/commit/a6f803aff1e634ae92b669975baa366a6b3b39c8 underway?