def GET(self, db): LOG.debug('fetching database %s', db) documents = self.client.db_fetch(db) if documents: return ok(json.dumps({ 'documents': self.client.db_fetch(db) })) return not_found()
def GET(self, db, doc): LOG.debug('with database %s fetching document %s' % (db, doc)) document = self.client.doc_fetch(db, doc) if document: return ok(json.dumps({ 'document': document })) return not_found()