mirror of
https://github.com/cp6/my-idlers.git
synced 2025-04-03 18:08:36 +00:00
Added note to API
This commit is contained in:
parent
6f59fb628c
commit
5445e9d67f
2 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,7 @@ use App\Models\IPs;
|
|||
use App\Models\Labels;
|
||||
use App\Models\Misc;
|
||||
use App\Models\NetworkSpeed;
|
||||
use App\Models\Note;
|
||||
use App\Models\OS;
|
||||
use App\Models\Pricing;
|
||||
use App\Models\Providers;
|
||||
|
@ -500,4 +501,10 @@ class ApiController extends Controller
|
|||
return response($yabs, 200);
|
||||
}
|
||||
|
||||
protected function getNote($id)
|
||||
{
|
||||
$note = Note::where('id', $id)->firstOrFail('note')->pluck('note');
|
||||
return response($note, 200)->header('Content-Type', 'text/plain');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -77,3 +77,5 @@ Route::middleware('auth:api')->get('dns/{domainName}/{type}', 'App\Http\Controll
|
|||
Route::middleware('throttle:4')->post('yabs/{server}/{key}', 'App\Http\Controllers\ApiController@storeYabs')->name('api.store-yabs');
|
||||
Route::middleware('auth:api')->get('yabs/', 'App\Http\Controllers\ApiController@getAllYabs');
|
||||
Route::middleware('auth:api')->get('yabs/{id}', 'App\Http\Controllers\ApiController@getYabs');
|
||||
|
||||
Route::middleware('auth:api')->get('note/{id}', 'App\Http\Controllers\ApiController@getNote');
|
||||
|
|
Loading…
Add table
Reference in a new issue