Rolling back prod

This commit is contained in:
James Ketr 2025-05-28 16:31:05 -07:00
parent 68a4ccb6d3
commit 474bbbed52
6 changed files with 29 additions and 24 deletions

View File

@ -95,7 +95,7 @@ services:
ports:
- "8081:8081"
environment:
- REDIS_HOSTS=local:redis:6379
- REDIS_HOSTS=redis:6379
networks:
- internal
depends_on:

View File

@ -13,7 +13,7 @@ import { CreateProfilePage } from 'pages/CreateProfilePage';
import { VectorVisualizerPage } from 'pages/VectorVisualizerPage';
import { HomePage } from 'pages/HomePage';
import { BetaPage } from 'pages/BetaPage';
import { CandidateListingPage } from 'pages/CandidateListingPage';
import { CandidateListingPage } from 'pages/FindCandidatePage';
import { JobAnalysisPage } from 'pages/JobAnalysisPage';
import { GenerateCandidate } from "pages/GenerateCandidate";
import { ControlsPage } from 'pages/ControlsPage';

View File

@ -271,14 +271,15 @@ const DocsPage = (props: BackstoryPageProps) => {
}
// Document grid for landing page
return (
<Paper sx={{ p: 5, border: "3px solid orange" }} elevation={1}>
<Typography variant="h4" component="h1" gutterBottom>
Documentation
</Typography>
<Typography variant="body1" color="text.secondary" paragraph>
Select a document from the sidebar to view detailed technical information about the application.
</Typography>
<Paper sx={{ p: 1 }} elevation={0}>
<Box sx={{ mb: 2 }}>
<Typography variant="h4" component="h1" gutterBottom>
Documentation
</Typography>
<Typography variant="body1" color="text.secondary">
Select a document from the sidebar to view detailed technical information about the application.
</Typography>
</Box>
<Grid container spacing={1}>
{documents.map((doc, index) => {
if (doc.route === null) return (<></>);

View File

@ -7,26 +7,21 @@ import { BackstoryPageProps } from '../components/BackstoryTab';
import { CandidateInfo } from 'components/CandidateInfo';
import { connectionBase } from '../utils/Global';
import { Candidate } from "../types/types";
import { ApiClient } from 'types/api-client';
const CandidateListingPage = (props: BackstoryPageProps) => {
const apiClient = new ApiClient();
const navigate = useNavigate();
const { setSnack } = props;
const [candidates, setCandidates] = useState<Candidate[] | undefined>(undefined);
const [candidates, setCandidates] = useState<Candidate[] | null>(null);
useEffect(() => {
if (candidates !== undefined) {
if (candidates !== null) {
return;
}
const fetchCandidates = async () => {
const getCandidates = async () => {
try {
let response;
response = await fetch(`${connectionBase}/api/u`, {
credentials: 'include',
});
if (!response.ok) {
throw new Error('Session not found');
}
const candidates: Candidate[] = await response.json();
const results = await apiClient.getCandidates();
const candidates: Candidate[] = results.data;
candidates.sort((a, b) => {
let result = a.lastName.localeCompare(b.lastName);
if (result === 0) {
@ -44,7 +39,7 @@ const CandidateListingPage = (props: BackstoryPageProps) => {
}
};
fetchCandidates();
getCandidates();
}, [candidates, setSnack]);
return (

View File

@ -12,7 +12,7 @@ from typing import Any, Dict, List, Optional, Union, get_origin, get_args
from datetime import datetime
from enum import Enum
from pathlib import Path
import stat
def run_command(command: str, description: str, cwd: str | None = None) -> bool:
"""Run a command and return success status"""
try:
@ -431,6 +431,8 @@ Examples:
# Step 4: Write to output file
with open(args.output, 'w') as f:
f.write(ts_content)
# Set read-only permissions (owner can read, others can read)
os.chmod(args.output, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
file_size = len(ts_content)
print(f"✅ TypeScript types generated: {args.output} ({file_size} characters)")

View File

@ -403,6 +403,13 @@ async def create_candidate(
# Create candidate
candidate = Candidate.model_validate(candidate_data)
# Check if candidate already exists
existing_candidate = await database.get_candidate(candidate.id)
if existing_candidate:
return JSONResponse(
status_code=400,
content=create_error_response("ALREADY_EXISTS", "Candidate already exists")
)
await database.set_candidate(candidate.id, candidate.model_dump())
# Add to users for auth (simplified)