Prettier format pending files
This commit is contained in:
parent
3904126a40
commit
5eab5f53e6
6 changed files with 28 additions and 14 deletions
|
|
@ -8,7 +8,7 @@ const GITBOOK_SPACE_ID = process.env.GITBOOK_SPACE_ID;
|
|||
// Validate environment variables
|
||||
if (!GITBOOK_API_TOKEN || !GITBOOK_SPACE_ID) {
|
||||
throw new Error(
|
||||
"Missing required environment variables: GITBOOK_API_TOKEN and GITBOOK_SPACE_ID"
|
||||
"Missing required environment variables: GITBOOK_API_TOKEN and GITBOOK_SPACE_ID",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,14 +219,20 @@ export function AdminDiscordManagement() {
|
|||
placeholder="Discord Server ID"
|
||||
value={newMapping.server_id}
|
||||
onChange={(e) =>
|
||||
setNewMapping({ ...newMapping, server_id: e.target.value })
|
||||
setNewMapping({
|
||||
...newMapping,
|
||||
server_id: e.target.value,
|
||||
})
|
||||
}
|
||||
className="w-full mt-1 bg-gray-800 border border-purple-500/30 rounded px-3 py-2 text-white focus:outline-none focus:border-purple-500"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button type="submit" className="w-full bg-purple-600 hover:bg-purple-700">
|
||||
<Button
|
||||
type="submit"
|
||||
className="w-full bg-purple-600 hover:bg-purple-700"
|
||||
>
|
||||
Add Mapping
|
||||
</Button>
|
||||
</form>
|
||||
|
|
@ -295,13 +301,16 @@ export function AdminDiscordManagement() {
|
|||
</Card>
|
||||
|
||||
{/* Delete Confirmation */}
|
||||
<AlertDialog open={!!deleteId} onOpenChange={(open) => !open && setDeleteId(null)}>
|
||||
<AlertDialog
|
||||
open={!!deleteId}
|
||||
onOpenChange={(open) => !open && setDeleteId(null)}
|
||||
>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Delete Role Mapping?</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
This role mapping will be permanently deleted. Users will no longer
|
||||
receive this role when setting this arm.
|
||||
This role mapping will be permanently deleted. Users will no
|
||||
longer receive this role when setting this arm.
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export default function Admin() {
|
|||
}, [user, loading, navigate]);
|
||||
|
||||
const [managedProfiles, setManagedProfiles] = useState<AethexUserProfile[]>(
|
||||
[]
|
||||
[],
|
||||
);
|
||||
const [studios, setStudios] = useState<Studio[]>([
|
||||
{
|
||||
|
|
@ -161,7 +161,7 @@ export default function Admin() {
|
|||
setProjectApplicationsLoading(true);
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/applications?owner=${encodeURIComponent(user.id)}`
|
||||
`/api/applications?owner=${encodeURIComponent(user.id)}`,
|
||||
);
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
|
|
@ -187,7 +187,7 @@ export default function Admin() {
|
|||
setOpportunityApplicationsLoading(true);
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/opportunities/applications?email=${encodeURIComponent(email)}`
|
||||
`/api/opportunities/applications?email=${encodeURIComponent(email)}`,
|
||||
);
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
|
|
@ -280,7 +280,7 @@ export default function Admin() {
|
|||
() =>
|
||||
managedProfiles.find((profile) => profile.id === selectedMemberId) ??
|
||||
null,
|
||||
[managedProfiles, selectedMemberId]
|
||||
[managedProfiles, selectedMemberId],
|
||||
);
|
||||
|
||||
const totalMembers = managedProfiles.length;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ NODE_ENV=production
|
|||
```
|
||||
|
||||
**Note:** Get these values from:
|
||||
|
||||
- Discord Developer Portal: Applications → Your Bot → Token & General Information
|
||||
- Supabase Dashboard: Project Settings → API
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ const missingVars = requiredEnvVars.filter((envVar) => !process.env[envVar]);
|
|||
if (missingVars.length > 0) {
|
||||
console.error(
|
||||
"❌ FATAL ERROR: Missing required environment variables:",
|
||||
missingVars.join(", ")
|
||||
missingVars.join(", "),
|
||||
);
|
||||
console.error("\nPlease set these in your Discloud/hosting environment:");
|
||||
missingVars.forEach((envVar) => {
|
||||
|
|
@ -128,7 +128,7 @@ async function registerCommands() {
|
|||
// Handle Entry Point command conflict (Discord Activity)
|
||||
if (error.code === 50240) {
|
||||
console.warn(
|
||||
"⚠️ Entry Point command detected (Discord Activity). Attempting to register without bulk update..."
|
||||
"⚠️ Entry Point command detected (Discord Activity). Attempting to register without bulk update...",
|
||||
);
|
||||
// Post commands individually to avoid bulk update conflicts
|
||||
for (const command of commands) {
|
||||
|
|
@ -137,7 +137,9 @@ async function registerCommands() {
|
|||
{ body: command },
|
||||
);
|
||||
}
|
||||
console.log(`✅ Successfully registered ${commands.length} slash commands (individual).`);
|
||||
console.log(
|
||||
`✅ Successfully registered ${commands.length} slash commands (individual).`,
|
||||
);
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ async function assignRoleByArm(guild, discordId, arm, supabase) {
|
|||
}
|
||||
|
||||
if (!mapping) {
|
||||
console.warn(`No role mapping found for arm: ${arm} in server: ${guild.id}`);
|
||||
console.warn(
|
||||
`No role mapping found for arm: ${arm} in server: ${guild.id}`,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue