소스 검색

Merge pull request #2 from brettz9/methods

Methods
dragfyre 6 년 전
부모
커밋
d55e3e8f65
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 4
      README.md
  2. 2 2
      api/routes/bDateRoutes.js

+ 4 - 4
README.md

@@ -2,13 +2,13 @@
 
 So far, there are two endpoints for this API:
 
-**GET /today**
+**POST /today**
 
-Returns today's date according to the Baháʼí/Badí' calendar.
+Returns today's date according to the Baháʼí/Badí' calendar via POST request.
 
-**POST /date**
+**GET /date**
 
-Given a date from the Gregorian calendar defined via POST data, returns the corresponding date in the Baháʼí calendar.
+Given a date from the Gregorian calendar defined via GET data, returns the corresponding date in the Baháʼí calendar.
 
 ## Running
 

+ 2 - 2
api/routes/bDateRoutes.js

@@ -7,8 +7,8 @@ module.exports = function(app) {
     .get(bDate.test);
   // Today's Badi date
   app.route('/today')
-    .get(bDate.today);
+    .post(bDate.today);
   // Arbitrary Badi date
   app.route('/date')
-    .post(bDate.date);
+    .get(bDate.date);
 };