mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 03:49:56 +02:00
Add optional geolocation parameters to Ampache API handshake
This commit is contained in:
parent
5d7c077eab
commit
9ab5f34f2e
1 changed files with 9 additions and 0 deletions
|
@ -200,6 +200,15 @@ class Api
|
||||||
$data['username'] = $client->username;
|
$data['username'] = $client->username;
|
||||||
$data['type'] = 'api';
|
$data['type'] = 'api';
|
||||||
$data['value'] = $timestamp;
|
$data['value'] = $timestamp;
|
||||||
|
if (isset($input['geo_latitude'])) {
|
||||||
|
$data['geo_latitude'] = $input['geo_latitude'];
|
||||||
|
}
|
||||||
|
if (isset($input['geo_longitude'])) {
|
||||||
|
$data['geo_longitude'] = $input['geo_longitude'];
|
||||||
|
}
|
||||||
|
if (isset($input['geo_name'])) {
|
||||||
|
$data['geo_name'] = $input['geo_name'];
|
||||||
|
}
|
||||||
$token = Session::create($data);
|
$token = Session::create($data);
|
||||||
|
|
||||||
debug_event('API', 'Login Success, passphrase matched', 1);
|
debug_event('API', 'Login Success, passphrase matched', 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue