Skip to content

Commit beaee94

Browse files
committed
Updated error for Google authentication.
1 parent 52a0338 commit beaee94

File tree

4 files changed

+74779
-1
lines changed

4 files changed

+74779
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
* text=auto
22
*.css linguist-vendored
33
*.scss linguist-vendored
4+
*.js linguist-vendored

app/Http/Controllers/Controller.php

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Swift_SmtpTransport;
3131
use Session;
3232
use SoapBox\Formatter\Formatter;
33+
use URL;
3334

3435
use Exception;
3536

@@ -2330,6 +2331,28 @@ protected function claim_reason_code($code)
23302331
}
23312332
}
23322333

2334+
protected function clinithink($text, $type)
2335+
{
2336+
$url = 'https://cloud.noshchartingsystem.com/noshapi/clinithink';
2337+
$query['type'] = $type;
2338+
if ($type == 'text') {
2339+
$query['text'] = $text;
2340+
}
2341+
if ($type == 'crossmap') {
2342+
$query['code'] = $text;
2343+
}
2344+
$message = http_build_query($query);
2345+
$ch = curl_init();
2346+
// $url = $url . "?" . $message;
2347+
curl_setopt($ch, CURLOPT_URL, $url);
2348+
curl_setopt($ch, CURLOPT_POST, 1);
2349+
curl_setopt($ch, CURLOPT_POSTFIELDS, $message);
2350+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
2351+
$data = curl_exec($ch);
2352+
curl_close($ch);
2353+
return $data;
2354+
}
2355+
23332356
protected function closest_match($input, $compare_arr)
23342357
{
23352358
$shortest = -1;
@@ -9549,6 +9572,20 @@ protected function github_all()
95499572
return $result;
95509573
}
95519574

9575+
protected function github_release()
9576+
{
9577+
$client = new \Github\Client(
9578+
new \Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
9579+
);
9580+
$client = new \Github\HttpClient\CachedHttpClient();
9581+
$client->setCache(
9582+
new \Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
9583+
);
9584+
$client = new \Github\Client($client);
9585+
$result = $client->api('repo')->releases()->latest('shihjay2', 'nosh2');
9586+
return $result;
9587+
}
9588+
95529589
protected function github_single($sha)
95539590
{
95549591
$client = new \Github\Client(
@@ -9559,7 +9596,7 @@ protected function github_single($sha)
95599596
new \Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
95609597
);
95619598
$client = new \Github\Client($client);
9562-
$result = $commit = $client->api('repo')->commits()->show('shihjay2', 'nosh2', $sha);
9599+
$result = $client->api('repo')->commits()->show('shihjay2', 'nosh2', $sha);
95639600
return $result;
95649601
}
95659602

0 commit comments

Comments
 (0)