OmerFlame / SwiftRant

devRant API library made in Swift.
GNU General Public License v3.0
3 stars 1 forks source link

decoding notif_state as Int instead of String if it fails #25

Closed WilhelmOks closed 1 year ago

WilhelmOks commented 1 year ago

I have created a new devRant account and the feed could not be decoded, because notif_state was -1 and it tried to decode it as a String. This happens probably when the account has not verified its email yet. So to fix it, I added code to decode it as an Int and then converting it into a String, if it fails.