Skip to content

Commit 05354a9

Browse files
committed
feat: replace graphql playground to GraphiQL
1 parent 67f278f commit 05354a9

File tree

3 files changed

+44
-500
lines changed

3 files changed

+44
-500
lines changed

catalog/controller/extension/d_vuefront/common/home.php

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ public function searchUrl($args)
2222
return $result;
2323
}
2424

25-
public function version() {
26-
return "1.0.0";
25+
public function version()
26+
{
27+
return "1.0.0";
2728
}
2829

2930
public function updateApp($args)
@@ -36,18 +37,18 @@ public function updateApp($args)
3637

3738
public function updateSite($args)
3839
{
39-
try {
40-
$rootFolder = realpath(DIR_APPLICATION.'../');
41-
$tmpFile = tempnam(sys_get_temp_dir(), 'TMP_');
42-
rename($tmpFile, $tmpFile .= '.tar');
43-
file_put_contents($tmpFile, file_get_contents("https://vuefront2019.s3.amazonaws.com/sites/".$args['number']."/vuefront-app.tar"));
44-
$this->removeDir($rootFolder.'/vuefront');
45-
$phar = new PharData($tmpFile);
46-
$phar->extractTo($rootFolder.'/vuefront');
47-
return true;
48-
} catch (\Exception $e) {
49-
}
50-
return false;
40+
try {
41+
$rootFolder = realpath(DIR_APPLICATION.'../');
42+
$tmpFile = tempnam(sys_get_temp_dir(), 'TMP_');
43+
rename($tmpFile, $tmpFile .= '.tar');
44+
file_put_contents($tmpFile, file_get_contents("https://vuefront2019.s3.amazonaws.com/sites/".$args['number']."/vuefront-app.tar"));
45+
$this->removeDir($rootFolder.'/vuefront');
46+
$phar = new PharData($tmpFile);
47+
$phar->extractTo($rootFolder.'/vuefront');
48+
return true;
49+
} catch (\Exception $e) {
50+
}
51+
return false;
5152
}
5253

5354
private function removeDir($dir)

catalog/controller/extension/module/d_vuefront.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function __construct($registry)
2323
}
2424
header('Access-Control-Allow-Methods: POST, OPTIONS');
2525
header('Access-Control-Allow-Credentials: true');
26-
header('Access-Control-Allow-Headers: accept,Referer,content-type,x-forwarded-for,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Token,token,Cookie,cookie,content-type');
26+
header('Access-Control-Allow-Headers: accept,Referer,content-type,x-forwarded-for,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Token,token,Cookie,cookie,content-type,Authorization');
2727
} catch (Exception $e) {
2828
}
2929
}

0 commit comments

Comments
 (0)