OSDN Git Service

まちがえてました
authoryamat0jp <terukohietori@gmail.com>
Mon, 11 Mar 2019 08:35:07 +0000 (17:35 +0900)
committeryamat0jp <terukohietori@gmail.com>
Mon, 11 Mar 2019 08:35:07 +0000 (17:35 +0900)
pybbs.py

index 5fbe8ff..2b0c82a 100644 (file)
--- a/pybbs.py
+++ b/pybbs.py
@@ -500,8 +500,9 @@ class HeadlineApi(web.RequestHandler):
 class ArticleApi(web.RequestHandler):
     def get(self,dbname,number):
         response = None
-        if self.application.collection(dbname) == True:
-            table = self.application.db[dbname]
+        db = escape.url_unescape(dbname)
+        if self.application.collection(db) is True:
+            table = self.application.db[db]
             response = table.find_one({'number':int(number)})      
         if not response:
             response = {}