mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 19:56:29 +01:00
root response fix
This commit is contained in:
parent
1b0ba8f010
commit
1248ad755e
2 changed files with 29 additions and 31 deletions
|
@ -57,10 +57,32 @@ sub fetch_merchant {
|
|||
my $req_authcookie = shift || "";
|
||||
my $req_merchant_id = shift || "";
|
||||
|
||||
my $response = { init_map => {
|
||||
my $response = {
|
||||
user_id => "",
|
||||
authcookie => "",
|
||||
new_authcoo => "0",
|
||||
clearing_cache => "0",
|
||||
agb_checked => "0",
|
||||
user_group => [],
|
||||
user_tour => [],
|
||||
response_state => "OK, nothing todo",
|
||||
privacy_html => "site/privacy_1.html",
|
||||
agb_html => "site/agb.html",
|
||||
impress_html => "site/impress.html",
|
||||
tariff_info_html => "site/tariff_info_1.html",
|
||||
bike_info_html => "site/bike_info.html",
|
||||
lang => "DE",
|
||||
last_used_operator => {
|
||||
operator_name => "sharee.bike | TeilRad GmbH",
|
||||
operator_color => "#009699",
|
||||
operator_email => "hotline\@sharee.bike",
|
||||
operator_phone => "+49 761 45370097",
|
||||
operator_hours => "Bürozeiten: Montag, Mittwoch, Freitag 9-12 Uhr",
|
||||
},
|
||||
init_map => {
|
||||
center => { latitude => "", longitude => "" },
|
||||
radius => ""
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
my $merchanized = 0;
|
||||
|
|
|
@ -59,37 +59,13 @@ print $q->header(-type => "application/json", -charset => "utf-8", -'Access-Cont
|
|||
|
||||
my $respreq = $q->param('request') || "";
|
||||
my $apiserver = $q->url(-base=>1) || "";
|
||||
my $copri_version = "4.1.8.41";
|
||||
|
||||
my $response = {
|
||||
apiserver => "$apiserver",
|
||||
user_id => "",
|
||||
authcookie => "",
|
||||
new_authcoo => "0",
|
||||
clearing_cache => "0",
|
||||
agb_checked => "0",
|
||||
user_group => [],
|
||||
user_tour => [],
|
||||
response => "$respreq",
|
||||
uri_primary => "$varenv{uri_primary}",
|
||||
copri_version => "$copri_version",
|
||||
response_state => "OK, nothing todo",
|
||||
privacy_html => "site/privacy_1.html",
|
||||
agb_html => "site/agb.html",
|
||||
impress_html => "site/impress.html",
|
||||
tariff_info_html => "site/tariff_info_1.html",
|
||||
bike_info_html => "site/bike_info.html",
|
||||
last_used_operator => {
|
||||
operator_name => "sharee.bike | TeilRad GmbH",
|
||||
operator_color => "#009699",
|
||||
operator_email => "hotline\@sharee.bike",
|
||||
operator_phone => "+49 761 45370097",
|
||||
operator_hours => "Bürozeiten: Montag, Mittwoch, Freitag 9-12 Uhr",
|
||||
},
|
||||
lang => "DE"
|
||||
};
|
||||
(my $aowner,$varenv{merchant_id},my $response) = $apif->fetch_merchant(\%varenv,"",$R::authcookie,$R::merchant_id);
|
||||
|
||||
(my $aowner,$varenv{merchant_id},$response) = $apif->fetch_merchant(\%varenv,"",$R::authcookie,$R::merchant_id);
|
||||
$response->{apiserver} = "$apiserver";
|
||||
$response->{response} = "$respreq";
|
||||
$response->{uri_primary} = "$varenv{uri_primary}";
|
||||
$response->{copri_version} = "4.1.9.40";
|
||||
|
||||
if(!$aowner && ($R::authcookie || $R::merchant_id)){
|
||||
$response->{response_state} = "Failure 9900: no authcookie or merchant_id defined";
|
||||
|
|
Loading…
Add table
Reference in a new issue