api.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. Header('Access-Control-Allow-Origin: *');
  3. Header('Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS');
  4. Header('Access-Control-Allow-Headers: Content-Type, Accept, Authorization');
  5. Header("HTTP/1.1 200 OK");
  6. Header("content-type:text/xml");
  7. use Illuminate\Http\Request;
  8. use Illuminate\Support\Facades\Route;
  9. /*
  10. |--------------------------------------------------------------------------
  11. | API Routes
  12. |--------------------------------------------------------------------------
  13. |
  14. | Here is where you can register API routes for your application. These
  15. | routes are loaded by the RouteServiceProvider within a group which
  16. | is assigned the "api" middleware group. Enjoy building your API!
  17. |
  18. */
  19. Route::group(['prefix' => 'api'], function () {
  20. Route::post('LoginAction', 'Auth\AuthController@LoginAccountActionPost');
  21. Route::post('ActionBanAccountUseHack', 'Auth\AntiHackController@ActionBanAccountUseHack');
  22. Route::post('RegisterAction', 'Auth\AuthController@RegisterAccountActionPost');
  23. Route::get('GetAllCharacters', 'CharController@GetAllCharacters');
  24. Route::get('GetUserCharacters/{username}', 'CharController@GetUserCharacters');
  25. Route::get('GetCharacterData/{char_id}/{table_name}', 'CharController@GetCharacterData');
  26. Route::post('UpdateCharacterData/{char_id}/{table_name}', 'CharController@UpdateCharacterData');
  27. Route::post('SendItemToCharacter', 'CharController@SendItemToCharacter');
  28. // Получение и обновление предмета по char_item_id в нужной таблице
  29. Route::get('GetCharItem/{table}/{char_item_id}', 'CharController@GetCharItem');
  30. Route::post('UpdateCharItem/{table}/{char_item_id}', 'CharController@UpdateCharItem');
  31. // Получение и обновление квеста по char_id и RecId, {table?} — опционально, по умолчанию CharQuest
  32. Route::get('GetCharQuest/{char_id}/{rec_id}/{table?}', 'CharController@GetCharQuest');
  33. Route::post('UpdateCharQuest/{char_id}/{rec_id}/{table?}', 'CharController@UpdateCharQuest');
  34. Route::group(['prefix' => 'funcs_adm'], function () {
  35. Route::get('UpdateCharItemAccount/{CharID?}', 'ADMIN\AdminController@UpdateCharItemAccount');
  36. Route::get('CheckCharItemAccount/{CharID?}/{StrRecordKind?}', 'ADMIN\AdminController@CheckCharItemAccount');
  37. Route::post('SendItemForAccount', 'ADMIN\AdminController@SendItemForAccount');
  38. Route::get('GetAccountsSpecialChar', 'ADMIN\AdminController@GetAccountsSpecialChar');
  39. Route::get('GetPCID', 'ADMIN\\AdminController@GetPCID');
  40. });
  41. });
  42. Route::group(['prefix' => 'nexon'], function () {
  43. Route::get('loginCheck/loginCheck', 'Auth\AuthController@LoginAccountCheck');
  44. Route::post('inquiryBalance/json', 'Cash\CashShopController@inquiryBalance');
  45. Route::post('nexonCash/charge/json', 'Cash\CashShopController@nexonCash');
  46. Route::post('purchaseItem/json', 'Cash\CashShopController@purchaseItem');
  47. });