Closed allenhumphreys closed 1 year ago
@const-cloudinary Let me know if I need to change anything here.
@allenhumphreys Thank you very much!
😉On Sep 21, 2023, at 2:17 AM, adimiz1 @.***> wrote: Since setSignature is not only used or upload but for other functions as well (destroy) for examples it returns CLDRequestParams There are other methods that do the same and that's intentional, since both CLDUploadRequestParams and CLDDestroyRequestParams (for example) inherits CLDRequestParams Therefore I suggest doing this: let parameters: CLDUploadRequestParams = CLDUploadRequestParams() .setSignature( .init( signature: decodedSignature.signature, timestamp: decodedSignature.timestamp as NSNumber ) ) Instead of let uploadParameters = parameters as! CLDUploadRequestParams
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Brief Summary of Changes
Currently if you form a signature manually, setting the signature on an
CLDUploadRequestParams
returns aCLDRequestParams
which requires the caller to cast the type back toCLDUploadRequestParams
.This change fixes it so
setSignature(_:)
correctly returns the subclass type. You'll notice this is already in place forsetApiKey(_:)
.What does this PR address?
Are tests included?
Reviewer, please note:
Checklist: