mastodon_algorithm_frontend/redirect.php

17 lines
564 B
PHP
Raw Permalink Normal View History

2022-11-29 21:30:09 +00:00
<?php
if(!isset($_GET['code'])) {
die('You cannot load this page directly! <a href="/">GO HOME</a>');
}
require('template/header.html');
require('template/footer.php');
?>
2022-12-04 20:42:44 +00:00
<script type="module">
import {functions} from './js/setup.js';
2022-11-29 21:30:09 +00:00
const urlparams = new URLSearchParams(window.location.search);
functions.createExecution('servers', '{"action": "redirect_code", "user_id": "' + urlparams.get('user_id') + '", "code": "' + urlparams.get('code') + '"}').then((res) => {
console.log(JSON.parse(res.response));
window.location.href = '/';
})
</script>