فهرست منبع

keep the existing GET method temporarily

to avoid any problems due to deployment in the wrong order
Brian Gough 9 سال پیش
والد
کامیت
727a534d01
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      services/document-updater/app.coffee

+ 3 - 0
services/document-updater/app.coffee

@@ -38,6 +38,9 @@ app.param 'doc_id', (req, res, next, doc_id) ->
 		next new Error("invalid doc id")
 
 app.get    '/project/:project_id/doc/:doc_id',                          HttpController.getDoc
+# temporarily keep the GET method for backwards compatibility
+app.get    '/project/:project_id/doc',                                  HttpController.getProjectDocsAndFlushIfOld
+# will migrate to the POST method of get_and_flush_if_old instead
 app.post   '/project/:project_id/get_and_flush_if_old',                 HttpController.getProjectDocsAndFlushIfOld
 app.post   '/project/:project_id/clearState',                           HttpController.clearProjectState
 app.post   '/project/:project_id/doc/:doc_id',                          HttpController.setDoc