feat: complete candle annotator implementation
- Created CandleChart component with lightweight-charts integration - Implemented SvgOverlay component for line drawing - Integrated all components in main page - Fixed TypeScript and Tailwind CSS compatibility issues - Added comprehensive README.md with project documentation - Created DEPLOYMENT.md with setup and troubleshooting guide - Downgraded to stable versions (Tailwind v3, lightweight-charts v4) - All 59 tasks from OpenSpec completed
This commit is contained in:
parent
8d1e72579e
commit
23f18f405a
11 changed files with 8166 additions and 24 deletions
|
|
@ -3,7 +3,7 @@ import Papa from 'papaparse';
|
|||
import { db } from '@/lib/db';
|
||||
import { candles } from '@/lib/db/schema';
|
||||
|
||||
export async function POST(request: NextRequest) {
|
||||
export async function POST(request: NextRequest): Promise<NextResponse> {
|
||||
try {
|
||||
const formData = await request.formData();
|
||||
const file = formData.get('file') as File;
|
||||
|
|
@ -17,7 +17,7 @@ export async function POST(request: NextRequest) {
|
|||
|
||||
const text = await file.text();
|
||||
|
||||
return new Promise((resolve) => {
|
||||
return new Promise<NextResponse>((resolve) => {
|
||||
Papa.parse(text, {
|
||||
header: true,
|
||||
dynamicTyping: true,
|
||||
|
|
@ -115,7 +115,7 @@ export async function POST(request: NextRequest) {
|
|||
);
|
||||
}
|
||||
},
|
||||
error: (error) => {
|
||||
error: (error: any) => {
|
||||
resolve(
|
||||
NextResponse.json(
|
||||
{ error: `CSV parsing error: ${error.message}` },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue