Skip to content

Commit

Permalink
feat: replace graphql playground to GraphiQL
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrdrvn committed Feb 4, 2022
1 parent 67f278f commit 05354a9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 500 deletions.
29 changes: 15 additions & 14 deletions catalog/controller/extension/d_vuefront/common/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ public function searchUrl($args)
return $result;
}

public function version() {
return "1.0.0";
public function version()
{
return "1.0.0";
}

public function updateApp($args)
Expand All @@ -36,18 +37,18 @@ public function updateApp($args)

public function updateSite($args)
{
try {
$rootFolder = realpath(DIR_APPLICATION.'../');
$tmpFile = tempnam(sys_get_temp_dir(), 'TMP_');
rename($tmpFile, $tmpFile .= '.tar');
file_put_contents($tmpFile, file_get_contents("https://vuefront2019.s3.amazonaws.com/sites/".$args['number']."/vuefront-app.tar"));
$this->removeDir($rootFolder.'/vuefront');
$phar = new PharData($tmpFile);
$phar->extractTo($rootFolder.'/vuefront');
return true;
} catch (\Exception $e) {
}
return false;
try {
$rootFolder = realpath(DIR_APPLICATION.'../');
$tmpFile = tempnam(sys_get_temp_dir(), 'TMP_');
rename($tmpFile, $tmpFile .= '.tar');
file_put_contents($tmpFile, file_get_contents("https://vuefront2019.s3.amazonaws.com/sites/".$args['number']."/vuefront-app.tar"));
$this->removeDir($rootFolder.'/vuefront');
$phar = new PharData($tmpFile);
$phar->extractTo($rootFolder.'/vuefront');
return true;
} catch (\Exception $e) {
}
return false;
}

private function removeDir($dir)
Expand Down
2 changes: 1 addition & 1 deletion catalog/controller/extension/module/d_vuefront.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct($registry)
}
header('Access-Control-Allow-Methods: POST, OPTIONS');
header('Access-Control-Allow-Credentials: true');
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');
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');
} catch (Exception $e) {
}
}
Expand Down
Loading

0 comments on commit 05354a9

Please sign in to comment.