Skip to content

Commit

Permalink
added today
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILIPP111007 committed Apr 12, 2024
1 parent 01f0e6c commit 4b89ef6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@ class ModelDayInput(BaseModel):
VOLUME: str
TRADINGSESSION: str
VALUE: str

today: str
4 changes: 4 additions & 0 deletions frontend/src/pages/PredictDay/components/PredictForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ export default function PredictForm({ getPredict, error, setError, success, setS
VOLUME: "",
TRADINGSESSION: "",
VALUE: "",

today: "",
})

async function callFunc(event) {
await event.preventDefault()

if (form.CAPITALIZATION && form.CLOSE && form.DIVISOR && form.HIGH && form.LOW && form.OPEN && form.TRADEDATE && form.finance && form.economic && form.politic) {
setError("")
var today = new Date().toISOString().split("T")[0]
form.today = today
return await getPredict(form)
} else {
setError("заполните форму")
Expand Down

0 comments on commit 4b89ef6

Please sign in to comment.