remember if the user checks the "location" checkbox and always find their location in the future if so
This commit is contained in:
parent
3f82ec2f75
commit
e357730b31
3 changed files with 73 additions and 24 deletions
|
@ -32,12 +32,24 @@ $app->get('/new', function() use($app) {
|
|||
'micropub_scope' => $user->micropub_scope,
|
||||
'micropub_access_token' => $user->micropub_access_token,
|
||||
'response_date' => $user->last_micropub_response_date,
|
||||
'test_response' => $test_response
|
||||
'test_response' => $test_response,
|
||||
'location_enabled' => $user->location_enabled
|
||||
));
|
||||
$app->response()->body($html);
|
||||
}
|
||||
});
|
||||
|
||||
$app->post('/prefs', function() use($app) {
|
||||
if($user=require_login($app)) {
|
||||
$params = $app->request()->params();
|
||||
$user->location_enabled = $params['enabled'];
|
||||
$user->save();
|
||||
}
|
||||
$app->response()->body(json_encode(array(
|
||||
'result' => 'ok'
|
||||
)));
|
||||
});
|
||||
|
||||
$app->get('/creating-a-token-endpoint', function() use($app) {
|
||||
$app->redirect('http://indiewebcamp.com/token-endpoint', 301);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue