Beit-Hatfutsot / dbs-back

The MoJP RESTfull API server
GNU Affero General Public License v3.0
1 stars 4 forks source link

Handle slug update - preserve old links #143

Open TheGrandVizier opened 7 years ago

TheGrandVizier commented 7 years ago

When an item page is updated and the header is changed, we need to also update the slug to reflect the new header. However, the old link to that page should still work and redirect users to the new URL.

Reproduce

  1. Update a slug to reflect the new header for item "Female Soldiers Standing on a truck"
  2. User arrives at old URL after slug has changed.

Actual result URL and Header differ in phrasing.

Expected Result User redirected from http://dbs.bh.org.il/image/girls-soldiers-standing-on-a-truck-israel-1950s to http://dbs.bh.org.il/image/female-soldiers-standing-on-a-truck-israel-1950s