Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Apr 18, 2024
1 parent bbde764 commit 202f6d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/checks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const CHECK_RUNNERS: CheckRunner[] = [
},
{
id: "users",
sql: ({ users }) => sql`external_user_id = ANY (${users})`,
sql: ({ users }) => sql`external_user_id = ANY(${sql.array(users, 20)})`, // 20 is to specify it's a postgres int4
},
{
id: "feedback",
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/components/checks/SmartSelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default function SmartCheckSelect({
const fixedValue = value || (multiple ? [] : null)

const handleValueSelect = (val: string) => {
setSearch("")
return multiple
? onChange(
fixedValue.includes(val)
Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/utils/fetcher/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ async function handleResponse(res: Response) {
const isLoginPage = Router.pathname === "/login"

if (!res.ok) {
if (res.status === 401 && !isLoginPage) {
if (
res.status === 401 &&
!isLoginPage &&
process.env.NODE_ENV !== "development"
) {
return signOut()
}

Expand Down

0 comments on commit 202f6d5

Please sign in to comment.