feat: Allow filtering searches by 'source'
fix: Do not show API searches in recent list in app
This commit is contained in:
@@ -24,6 +24,7 @@ describe("#searches.list", () => {
|
||||
userId: user.id,
|
||||
teamId: user.teamId,
|
||||
query: "bar",
|
||||
source: "api",
|
||||
}),
|
||||
]);
|
||||
});
|
||||
@@ -42,6 +43,18 @@ describe("#searches.list", () => {
|
||||
expect(queries).toContain("foo");
|
||||
expect(queries).toContain("bar");
|
||||
});
|
||||
|
||||
it("should allow filtering by source", async () => {
|
||||
const res = await server.post("/api/searches.list", {
|
||||
body: {
|
||||
token: user.getJwtToken(),
|
||||
source: "api",
|
||||
},
|
||||
});
|
||||
const body = await res.json();
|
||||
expect(res.status).toEqual(200);
|
||||
expect(body.data).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#searches.update", () => {
|
||||
|
||||
Reference in New Issue
Block a user