Compare commits

..

No commits in common. "app" and "main" have entirely different histories.
app ... main

3149 changed files with 357188 additions and 18663 deletions

41
.env.example Normal file
View File

@ -0,0 +1,41 @@
APP_ENV=production
APP_DEBUG=true
APP_KEY=base64:ygngELJvE4TbfP8g/mBUl6+QzmWIvFW8Y2cgnADYIUY=
APP_URL=http://vanguard.test
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST="localhost"
DB_DATABASE="casadocdb"
DB_USERNAME="xxx"
DB_PASSWORD="xxx"
DB_PREFIX="auth_"
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_DRIVER=sync
SESSION_DRIVER=database
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=mail
MAIL_FROM_NAME=Vanguard
MAIL_FROM_ADDRESS=vanguard@test.dev
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

83
.gitignore vendored
View File

@ -1,59 +1,28 @@
**/.DS_Store
.DS_Store .DS_Store
/node_modules
# Environment Variables (Secrets) /public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.fleet
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env .env
.env.* .phpunit.result.cache
!.env.example .php_cs.cache
server/.env /documentation
mobile/.env /.phpunit.cache
/public/build
# Server (PHP/Laravel) .env.backup
server/auth.json .env.production
_ide_helper.php auth.json
_ide_helper_models.php public/Connections/casadocconn.php
.phpstorm.meta.php public/userportal/tools/mailer.php
server/.fleet public/userportal/persondocuments/
server/.idea public/userportal/mainphoto/
server/.php_cs.cache public/userportal/homedocuments/
server/.phpunit.cache
server/.phpunit.result.cache
server/.vagrant
server/.vscode
server/Homestead.json
server/Homestead.yaml
server/bootstrap/cache
server/documentation
server/node_modules
server/npm-debug.log
server/public/build
server/public/hot
server/public/storage
server/public/userportal
server/storage/*.key
server/storage/app/private
server/storage/debugbar
server/storage/debugbar/*
server/storage/framework/cache/data
server/storage/framework/sessions
server/storage/framework/testing
server/storage/framework/views
server/storage/logs
server/vendor
# Mobile (React Native/Expo)
mobile/.expo
mobile/android
mobile/ios
mobile/node_modules
mobile/dist
mobile/web-build
mobile/npm-debug.log
# Docker
docker-compose.override.yml
# VS Code
.vscode/
# Ignore user-uploaded content
server/public/upload

28365
_ide_helper.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,6 @@ class SocialLoginController extends ApiController
public function index(ApiAuthenticateRequest $request) public function index(ApiAuthenticateRequest $request)
{ {
\Log::info('Social Login Hit: ' . $request->network);
try { try {
$socialUser = Socialite::driver($request->network)->userFromToken($request->social_token); $socialUser = Socialite::driver($request->network)->userFromToken($request->social_token);
} catch (Exception $e) { } catch (Exception $e) {

View File

@ -49,21 +49,4 @@ class DetailsController extends ApiController
return new UserResource($user); return new UserResource($user);
} }
/**
* Delete user's account.
* @return \Illuminate\Http\JsonResponse
*/
public function destroy()
{
$user = auth()->user();
try {
event(new \Vanguard\Events\User\Deleted($user));
$user->delete();
return $this->respondWithSuccess();
} catch (\Exception $e) {
return $this->errorInternal($e->getMessage());
}
}
} }

View File

@ -127,16 +127,14 @@ class UsersController extends ApiController
*/ */
public function destroy(User $user) public function destroy(User $user)
{ {
try { if ($user->id == auth()->id()) {
event(new Deleted($user)); return $this->errorForbidden(__("You cannot delete yourself."));
$user->delete();
return $this->respondWithSuccess();
} catch (\Illuminate\Database\QueryException $e) {
return $this->errorInternal($e->getMessage());
} catch (\Exception $e) {
return $this->errorInternal($e->getMessage());
} }
event(new Deleted($user));
$this->users->delete($user->id);
return $this->respondWithSuccess();
} }
} }

View File

@ -106,7 +106,7 @@ class LoginController extends Controller
return redirect()->to($request->get('to')); return redirect()->to($request->get('to'));
} }
return redirect()->intended(); return redirect()->to("userportal/index.php");
} }
/** /**

Some files were not shown because too many files have changed in this diff Show More