Add functionality to upload and display articles with associated images
Update article page to handle image uploads and display articles from text files. Refactor currency and date formatting, and add a method to fetch prediction markets by ID. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 0fb68265-c270-4198-9584-3d9be9bddb41 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/0fb68265-c270-4198-9584-3d9be9bddb41/rOJiPGe
This commit is contained in:
@ -259,7 +259,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
res.status(201).json(bet);
|
||||
} catch (error) {
|
||||
console.error("Error placing prediction bet:", error);
|
||||
if (error.message === "Prediction market not found") {
|
||||
if (error instanceof Error && error.message === "Prediction market not found") {
|
||||
return res.status(404).json({ message: "Prediction market not found" });
|
||||
}
|
||||
res.status(500).json({ message: "Failed to place bet" });
|
||||
|
||||
Reference in New Issue
Block a user