feat: Show recent searches (#2868)
* stash * root hookup * recent searches UI * feat: Add search query deletion * simplify no results state * lint
This commit is contained in:
8
server/policies/searchQuery.ts
Normal file
8
server/policies/searchQuery.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { SearchQuery, User } from "@server/models";
|
||||
import policy from "./policy";
|
||||
|
||||
const { allow } = policy;
|
||||
|
||||
allow(User, ["read", "delete"], SearchQuery, (user, searchQuery) => {
|
||||
return user && user.id === searchQuery.userId;
|
||||
});
|
||||
Reference in New Issue
Block a user