diff --git a/packages/server/src/api/controllers/application.js b/packages/server/src/api/controllers/application.js index b9f9dd8c5a..157060e855 100644 --- a/packages/server/src/api/controllers/application.js +++ b/packages/server/src/api/controllers/application.js @@ -210,7 +210,7 @@ exports.create = async function (ctx) { exports.update = async function (ctx) { const url = await getAppUrlIfNotInUse(ctx) const db = new CouchDB(ctx.params.appId) - const application = await db.get(ctx.params.appId) + const application = await db.get(DocumentTypes.APP_METADATA) const data = ctx.request.body const newData = { ...application, ...data, url } @@ -231,7 +231,7 @@ exports.update = async function (ctx) { exports.delete = async function (ctx) { const db = new CouchDB(ctx.params.appId) - const app = await db.get(ctx.params.appId) + const app = await db.get(DocumentTypes.APP_METADATA) const result = await db.destroy() /* istanbul ignore next */ if (!env.isTest()) { diff --git a/packages/server/src/api/routes/tests/row.spec.js b/packages/server/src/api/routes/tests/row.spec.js index fb8ff96efa..f67d6254db 100644 --- a/packages/server/src/api/routes/tests/row.spec.js +++ b/packages/server/src/api/routes/tests/row.spec.js @@ -304,24 +304,6 @@ describe("/rows", () => { }) }) - describe("search", () => { - it("should run a search on the table", async () => { - const res = await request - .post(`/api/${table._id}/rows/search`) - .send({ - query: { - name: "Test", - }, - pagination: { pageSize: 25 } - }) - .set(config.defaultHeaders()) - .expect('Content-Type', /json/) - .expect(200) - expect(res.body.rows.length).toEqual(1) - expect(res.body.bookmark).toBeDefined() - }) - }) - describe("fetchView", () => { it("should be able to fetch tables contents via 'view'", async () => { const row = await config.createRow()