diff --git a/packages/builder/src/components/database/DataTable/modals/DeleteRecord.svelte b/packages/builder/src/components/database/DataTable/modals/DeleteRecord.svelte index 4f533f812d..4b4d51329e 100644 --- a/packages/builder/src/components/database/DataTable/modals/DeleteRecord.svelte +++ b/packages/builder/src/components/database/DataTable/modals/DeleteRecord.svelte @@ -10,10 +10,10 @@
- +

Delete Record

- +

Are you sure you want to delete this record? All of your data will be permanently removed. This action cannot be undone. @@ -47,7 +47,7 @@ border-top: 1px solid #ccc; } - heading { + header { display: flex; align-items: center; } diff --git a/packages/builder/src/components/database/DataTable/modals/DeleteTable.svelte b/packages/builder/src/components/database/DataTable/modals/DeleteTable.svelte index 65471a7b28..c47b9e632a 100644 --- a/packages/builder/src/components/database/DataTable/modals/DeleteTable.svelte +++ b/packages/builder/src/components/database/DataTable/modals/DeleteTable.svelte @@ -14,10 +14,10 @@

- +

Delete Table

- +

Are you sure you want to delete this table? All of your data will be permanently removed. This action cannot be undone. @@ -50,7 +50,7 @@ border-top: 1px solid #ccc; } - heading { + header { display: flex; align-items: center; } diff --git a/packages/builder/src/components/database/DataTable/modals/DeleteView.svelte b/packages/builder/src/components/database/DataTable/modals/DeleteView.svelte index 6d8f3b7455..9d6c11cdb0 100644 --- a/packages/builder/src/components/database/DataTable/modals/DeleteView.svelte +++ b/packages/builder/src/components/database/DataTable/modals/DeleteView.svelte @@ -11,10 +11,10 @@

- +

Delete View

- +

Are you sure you want to delete this view? All of your data will be permanently removed. This action cannot be undone. @@ -48,7 +48,7 @@ border-top: 1px solid #ccc; } - heading { + header { display: flex; align-items: center; } diff --git a/packages/builder/src/components/database/DataTable/popovers/Calculate.svelte b/packages/builder/src/components/database/DataTable/popovers/Calculate.svelte index 3507ef23d5..4cd5931f76 100644 --- a/packages/builder/src/components/database/DataTable/popovers/Calculate.svelte +++ b/packages/builder/src/components/database/DataTable/popovers/Calculate.svelte @@ -1,5 +1,12 @@ -

+
{title} diff --git a/packages/server/src/api/routes/tests/view.spec.js b/packages/server/src/api/routes/tests/view.spec.js index ef173a224a..24948da3bc 100644 --- a/packages/server/src/api/routes/tests/view.spec.js +++ b/packages/server/src/api/routes/tests/view.spec.js @@ -65,7 +65,15 @@ describe("/views", () => { expect(updatedModel.views).toEqual({ TestView: { field: "Price", - modelId: model._id + modelId: model._id, + schema: { + sum: "number", + min: "number", + max: "number", + count: "number", + sumsqr: "number", + avg: "number" + } } }); }) @@ -108,10 +116,7 @@ describe("/views", () => { Price: 4000 }) const res = await request - .post(`/api/views/query/TestView`) - .send({ - meta: {} - }) + .get(`/api/views/TestView?stats=true`) .set(defaultHeaders(app._id, instance._id)) .expect('Content-Type', /json/) .expect(200) @@ -142,12 +147,7 @@ describe("/views", () => { Category: "Two" }) const res = await request - .post(`/api/views/query/TestView`) - .send({ - meta: { - groupBy: "Category" - } - }) + .get(`/api/views/TestView?stats=true&group=Category`) .set(defaultHeaders(app._id, instance._id)) .expect('Content-Type', /json/) .expect(200) diff --git a/packages/server/src/middleware/authenticated.js b/packages/server/src/middleware/authenticated.js index e1ad397d7e..53cb0b2c13 100644 --- a/packages/server/src/middleware/authenticated.js +++ b/packages/server/src/middleware/authenticated.js @@ -14,10 +14,6 @@ module.exports = async (ctx, next) => { return } - // ctx.user = { - // instanceId: "inst_4e6f424_970ca7f2b9e24ec8896eb10862d7f22b" - // } - const appToken = ctx.cookies.get("budibase:token") const builderToken = ctx.cookies.get("builder:token")