aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Http/Controllers/PublicKeyController.php2
-rw-r--r--app/Providers/RouteServiceProvider.php16
-rw-r--r--app/User.php6
3 files changed, 14 insertions, 10 deletions
diff --git a/app/Http/Controllers/PublicKeyController.php b/app/Http/Controllers/PublicKeyController.php
index 4557733..af59cc2 100644
--- a/app/Http/Controllers/PublicKeyController.php
+++ b/app/Http/Controllers/PublicKeyController.php
@@ -29,7 +29,7 @@ class PublicKeyController extends Controller
$public_key->key = $request->input('key');
$public_key->save();
- return response()->json(['message' => 'Successfully inserted public key.']);
+ return response()->json(['message' => 'Successfully inserted public key.'], 201);
}
public function setUsersKeyByCookie(Request $request)
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index 5ea48d3..49f44ff 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -2,8 +2,8 @@
namespace App\Providers;
-use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
+use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
@@ -52,8 +52,12 @@ class RouteServiceProvider extends ServiceProvider
protected function mapWebRoutes()
{
Route::middleware('web')
- ->namespace($this->namespace)
- ->group(base_path('routes/web.php'));
+ ->namespace($this->namespace)
+ ->group(base_path('routes/web.php'));
+
+ Route::middleware('web')
+ ->namespace($this->namespace)
+ ->group(base_path('routes/keys.php'));
}
/**
@@ -66,8 +70,8 @@ class RouteServiceProvider extends ServiceProvider
protected function mapApiRoutes()
{
Route::prefix('api')
- ->middleware('api')
- ->namespace($this->namespace)
- ->group(base_path('routes/api.php'));
+ //->middleware('api')
+ ->namespace($this->namespace)
+ ->group(base_path('routes/api.php'));
}
}
diff --git a/app/User.php b/app/User.php
index 923e2cc..f263c47 100644
--- a/app/User.php
+++ b/app/User.php
@@ -13,15 +13,15 @@ class User extends Authenticatable
* @var array
*/
protected $fillable = [
- 'name', 'email', 'password', 'prevHash','hash'
+ 'name', 'email', 'password', 'prevHash', 'hash',
];
-
+
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
- 'password', 'remember_token',
+ 'password', 'remember_token', 'prevHash',
];
}