Change id type to make it consistent
According to dict BOOKS, id should be a string instead an int.
This commit is contained in:
@@ -64,7 +64,7 @@ in pecan):
|
||||
# HTTP POST /
|
||||
@index.when(method='POST', template='json')
|
||||
def index_POST(self, **kw):
|
||||
id_ = len(BOOKS)
|
||||
id_ = str(len(BOOKS))
|
||||
BOOKS[id_] = kw['name']
|
||||
return dict(id=id_, name=kw['name'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user