Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure the apis #16

Merged
merged 10 commits into from May 8, 2022
Merged

Secure the apis #16

merged 10 commits into from May 8, 2022

Conversation

visegripped
Copy link
Owner

No description provided.

@@ -1,4 +1,4 @@
FROM php:7.4.18-apache
FROM php:8.1.4-apache
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the oAuth dependencies required a newer version of php.

$symbol = $_GET['symbol'];
$startDate = $_GET['startDate'];
$endDate = $_GET['endDate'];
$task = $_GET['task'] ?? "";
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These started erroring after the upgrade to PHP8. The defaults fixed it.


function getHistory($symbol, $startDate, $endDate, $pdo) {
$history = array();
$query = "select date, EOD, MA20, MA50, delta, deltaMA5, deltaMA10, deltaMA20, P0, P1, P2, M1, M2, M3 from $symbol where date >= $startDate and date <= $endDate order by date DESC";
// $query = "select date, EOD, MA20, MA50, delta, deltaMA5, deltaMA10, deltaMA20, P0, P1, P2, M1, M2, M3 from ".$pdo->quote($symbol)." where date between ".$pdo->quote($startDate)." and ".$pdo->quote($endDate)." order by date DESC";
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to get these working again. started throwing an error after the upgrade.


const setTokens = (authResponse) => {
const { accessToken, tokenId } = authResponse;
document.cookie = `tokenId=${tokenId};`
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to set an expiration on this.

@visegripped visegripped merged commit 9649fe5 into master May 8, 2022
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant