Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()