fix: address CTO review feedback on quick-find search (GH #97, GRO-134)
- Remove unused makeSelectChain function from search.test.ts (lint blocker)
- Fix handleClientClick/handlePetClick to navigate to /admin/clients?highlight={id}
so the target client is identified in the URL rather than silently ignored
- Add console.warn for fetch errors in GlobalSearch instead of swallowing silently
Auth middleware verified: searchRouter is registered on the api Hono instance
which applies authMiddleware + resolveStaffMiddleware globally — no coverage gap.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -34,16 +34,6 @@ vi.mock("@groombook/db", () => {
|
||||
const clients = tableProxy("clients");
|
||||
const pets = tableProxy("pets");
|
||||
|
||||
function makeSelectChain(results: unknown[]): unknown {
|
||||
const chain: Record<string, unknown> = {};
|
||||
const terminal = () => Promise.resolve(results);
|
||||
chain.from = () => chain;
|
||||
chain.innerJoin = () => chain;
|
||||
chain.where = () => chain;
|
||||
chain.limit = terminal;
|
||||
return chain;
|
||||
}
|
||||
|
||||
return {
|
||||
getDb: () => ({
|
||||
select: (_fields?: unknown) => {
|
||||
|
||||
Reference in New Issue
Block a user