[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2026-02-10 23:59:10 +00:00
committed by GitHub
parent 59f843f8a0
commit 1326d14a00
2 changed files with 14 additions and 8 deletions

View File

@@ -1,6 +1,14 @@
"use client";
import { Eye, Loader2, LogIn, Pencil, Plus, Shield, Trash2 } from "lucide-react";
import {
Eye,
Loader2,
LogIn,
Pencil,
Plus,
Shield,
Trash2,
} from "lucide-react";
import { useEffect, useState } from "react";
import { toast } from "sonner";
import { DialogAction } from "@/components/shared/dialog-action";
@@ -491,9 +499,7 @@ export const SSOSettings = () => {
<Button
size="sm"
onClick={handleSaveEdit}
disabled={
!editingValue.trim() || isUpdatingOrigin
}
disabled={!editingValue.trim() || isUpdatingOrigin}
>
Save
</Button>
@@ -522,9 +528,7 @@ export const SSOSettings = () => {
title="Remove trusted origin"
description={`Remove "${origin}" from trusted origins?`}
type="destructive"
onClick={async () =>
handleRemoveOrigin(origin)
}
onClick={async () => handleRemoveOrigin(origin)}
>
<Button
variant="ghost"

View File

@@ -205,7 +205,9 @@ export const ssoRouter = createTRPCRouter({
columns: { trustedOrigins: true },
});
const existing = currentUser?.trustedOrigins || [];
const next = existing.filter((o) => o.toLowerCase() !== normalized.toLowerCase());
const next = existing.filter(
(o) => o.toLowerCase() !== normalized.toLowerCase(),
);
await db
.update(user)
.set({ trustedOrigins: next })