LEGACY ROUTE for avatars


(Blake Erickson) #1

I’m working on fixing the 1 pending test (I can’t stand looking at that asterisks anymore!) in the discourse_api gem which has to do with uploading avatars.

Anyways, I checked the Discourse Route file and found some LEGACY ROUTE lines:

get "users/:username/avatar(/:size)" => "users#avatar", constraints: {username: USERNAME_ROUTE_FORMAT} # LEGACY ROUTE
post "users/:username/preferences/avatar" => "users#upload_avatar", constraints: {username: USERNAME_ROUTE_FORMAT} # LEGACY ROUTE

Just curious if something internally was still using these routes? Or just wanted to keep from making breaking changes post 1.0? And if/when we should work on removing them?

I did get the new routes working for uploading avatars for the discourse_api gem, so expect a pull request soon.


(Sam Saffron) #2

these are ancient, I think we can probably get rid of them now.


(Blake Erickson) #3

Cool. I’ll send a PR when I get a chance :smiley:


(Blake Erickson) #4

Here are the links to the PR’s that remove the legacy avatar code:

discourse/discourse:
https://github.com/discourse/discourse/pull/3026

discourse/discourse_api:
https://github.com/discourse/discourse_api/pull/53


(Jeff Atwood) #5