Skip to content

Commit

Permalink
test 7
Browse files Browse the repository at this point in the history
  • Loading branch information
kol4k committed Mar 1, 2018
1 parent 1f6bdb8 commit 1b2b501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/Http/Services/GetMessageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ public function __construct(SusiController $susi)
public function replySend($formData)
{
$replyToken = $formData['events']['0']['replyToken'];
$message = $formData['events']['0']['message']['text'];

$this->client = new CurlHTTPClient(env('LINE_BOT_ACCESS_TOKEN'));
$this->bot = new LINEBot($this->client, ['channelSecret' => env('LINE_BOT_SECRET')]);

$response = $this->bot->replyText($replyToken, 'xx'.$susi->getFunction());
$response = $this->bot->replyText($replyToken, $this->susi->getFunction());

if ($response->isSucceeded()) {
logger("reply success!!");
Expand Down
5 changes: 2 additions & 3 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
return $request->user();
});

Route::get('susi/{query}', 'Library\SusiController@getFunction');
// Route::get('susi', 'Library\SusiController@getFunction');
Route::get('/get-message', function (Request $request) {
logger("message request : ", $request->all());
});
Route::post('/get-message', ['as' => 'line.bot.message', 'uses' => 'GetMessageController@getMessage']);
Route::get('x/{query}', 'GetMessageController@test');
Route::post('/get-message', ['as' => 'line.bot.message', 'uses' => 'GetMessageController@getMessage']);

0 comments on commit 1b2b501

Please sign in to comment.