Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
Some Route Organisations & Fixed Logout when Maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Feb 10, 2017
1 parent 8fdaea6 commit 9515cf9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [1.905](https://github.com/sant0ro/chocolatey/tree/1.905) (2017-02-10)
[Full Changelog](https://github.com/sant0ro/chocolatey/compare/1.901...1.905)

**Closed issues:**

- Articles Pagination [\#6](https://github.com/sant0ro/chocolatey/issues/6)

## [1.901](https://github.com/sant0ro/chocolatey/tree/1.901) (2017-02-09)
[Full Changelog](https://github.com/sant0ro/chocolatey/compare/1.900...1.901)

Expand Down
42 changes: 21 additions & 21 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$path = Config::get('chocolatey.path');

# Main Route
$app->get($path . '', 'HomePageController@show');
$app->get($path, 'HomePageController@show');

/*
|--------------------------------------------------------------------------
Expand All @@ -30,47 +30,48 @@
|
*/

# Logout User
$app->post($path . 'api/public/authentication/logout', 'LoginController@logout');

# Maintenance Middleware
$app->group(['middleware' => 'maintenance'], function () use ($app, $path) {

# Main API Request is Forbidden
# Main API Request is Forbidden
$app->get($path . 'api', function () {
return response('Unauthorized.', 401);
});

# Go to Help Page
# Go to Help Page
$app->get($path . 'api/public/help', function () {
return redirect(Config::get('chocolatey.help'));
});

# Get Data from a Room
# Get Data from a Room
$app->get($path . 'api/public/rooms/{room}', 'RoomsController@getRoom');

# Get User Public Data
# Get User Public Data
$app->get($path . 'api/public/users', 'ProfileController@getPublicData');

# Get User Public Data
# Get User Public Data
$app->get($path . 'api/public/users/{userId}/profile', 'ProfileController@getPublicProfile');

# Create an User Request
# Create an User Request
$app->post($path . 'api/public/registration/new', 'LoginController@register');

# Confirm E-mail
# Confirm E-mail
$app->post($path . 'api/public/registration/activate', 'AccountController@confirmActivation');

# Change Password Request
# Change Password Request
$app->post($path . 'api/public/forgotPassword/send', 'MailController@forgotPassword');

# Confirm E-mail
# Confirm E-mail
$app->post($path . 'api/public/forgotPassword/changePassword', 'AccountSecurityController@confirmChangePassword');

# Authenticate User
# Authenticate User
$app->post($path . 'api/public/authentication/login', 'LoginController@login');

# Middleware that Requires Authentication
# Middleware that Requires Authentication
$app->group(['middleware' => 'auth'], function () use ($app, $path) {
# Logout User
$app->post($path . 'api/public/authentication/logout', 'LoginController@logout');

# Client URL
$app->get($path . 'api/client/clienturl', 'ClientController@getUrl');
Expand Down Expand Up @@ -110,7 +111,7 @@

# Habbo Client Loginstep
$app->post($path . 'api/log/loginstep', function () {
return response(null, 204);
return response()->json(null, 204);
});

# New User Client Check
Expand Down Expand Up @@ -144,7 +145,6 @@
$app->post($path . 'api/newuser/room/select', 'AccountController@selectRoom');
});


/*
|--------------------------------------------------------------------------
| Habbo ShopAPI Routes
Expand All @@ -155,18 +155,18 @@
|
*/

# Main ShopAPI Request is Forbidden
# Main ShopAPI Request is Forbidden
$app->get($path . 'shopapi', function () {
return response('Unauthorized.', 401);
});

# Get a List of all Shop Countries
# Get a List of all Shop Countries
$app->get($path . 'shopapi/public/countries', 'ShopController@listCountries');

# Get the Inventory of a specific Country
# Get the Inventory of a specific Country
$app->get($path . 'shopapi/public/inventory/{countryCode}', 'ShopController@getInventory');

# Middleware that Requires Authentication
# Middleware that Requires Authentication
$app->group(['middleware' => 'auth'], function () use ($app, $path) {
# Get User Purse
$app->get($path . 'shopapi/purse', 'ShopController@getPurse');
Expand Down Expand Up @@ -322,4 +322,4 @@
|
*/

$app->get($path . 'habbo-web-ads/{interstitial}', 'ClientController@getInterstitial');
$app->get($path . 'habbo-web-ads/{interstitial}', 'ClientController@getInterstitial');

0 comments on commit 9515cf9

Please sign in to comment.