Fix linting

This commit is contained in:
MartinBraquet
2025-08-03 01:01:06 +02:00
parent fadf1b57c9
commit 1693a51b3e
3 changed files with 7 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ export async function POST(req: Request) {
},
});
const modelMap = {
const modelMap: any = {
interest: prisma.interest,
profileInterest: prisma.profileInterest,
connection: prisma.connection,
@@ -75,7 +75,9 @@ export async function POST(req: Request) {
profileCauseArea: prisma.profileCauseArea,
} as const;
async function handleFeatures(features, attribute: string, profileAttribute: string, idName: string) {
type ModelKey = keyof typeof modelMap;
async function handleFeatures(features: any, attribute: ModelKey, profileAttribute: string, idName: string) {
// Add new features
if (features.length > 0 && updatedUser.profile) {
// First, find or create all features

View File

@@ -96,7 +96,7 @@ function RegisterComponent() {
setPersonalityType(profile.personalityType || null);
setConflictStyle(profile.conflictStyle || '');
if (profile.promptAnswers) {
setPromptAnswers(Object.fromEntries(profile.promptAnswers.map(item => [item.prompt, item.answer])));
setPromptAnswers(Object.fromEntries(profile.promptAnswers.map((item: Prompt) => [item.prompt, item.answer])));
}
setIntroversion(profile.introversion || null);
if (profile.birthYear) {
@@ -267,7 +267,7 @@ function RegisterComponent() {
console.log('submit image', key);
console.log('submit images', keys);
const data = {
const data: any = {
profile: {
description,
contactInfo,

View File

@@ -20,7 +20,7 @@ interface PromptAnswerProps {
prompts: string[];
onAnswerChange: (answer: Answer) => void;
initialAnswer?: string;
initialValues?;
initialValues?: any;
initialPromptId?: string;
className?: string;
}