From 44fd87fe4cd4ebed61c300a8efdff56f2870c792 Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Wed, 7 Nov 2018 16:19:28 +0100
Subject: [PATCH] update config package.json

---
 angular.json   | 34 +++++++++++++++++-----------------
 index.php      |  1 -
 package.json   |  1 +
 rest/index.php |  5 +++--
 4 files changed, 21 insertions(+), 20 deletions(-)
 delete mode 100755 index.php

diff --git a/angular.json b/angular.json
index bd33223705..522e0c1f76 100644
--- a/angular.json
+++ b/angular.json
@@ -14,16 +14,16 @@
           "builder": "@angular-devkit/build-angular:browser",
           "options": {
             "outputPath": "dist/",
-            "index": "src/frontend/index.html",
-            "main": "src/main.ts",
-            "polyfills": "src/polyfills.ts",
-            "tsConfig": "src/tsconfig.app.json",
+            "index": "./src/frontend/index.html",
+            "main": "./src/main.ts",
+            "polyfills": "./src/polyfills.ts",
+            "tsConfig": "./src/tsconfig.app.json",
             "assets": [
-              "src/favicon.ico",
-              "src/assets"
+              "./src/favicon.ico",
+              "./src/assets"
             ],
             "styles": [
-              "src/styles.styl"
+              "./src/styles.styl"
             ],
             "scripts": [
               "./node_modules/jquery/dist/jquery.min.js"
@@ -33,8 +33,8 @@
             "production": {
               "fileReplacements": [
                 {
-                  "replace": "src/environments/environment.ts",
-                  "with": "src/environments/environment.prod.ts"
+                  "replace": "./src/environments/environment.ts",
+                  "with": "./src/environments/environment.prod.ts"
                 }
               ],
               "optimization": true,
@@ -69,13 +69,13 @@
         "test": {
           "builder": "@angular-devkit/build-angular:karma",
           "options": {
-            "main": "src/test.ts",
-            "polyfills": "src/polyfills.ts",
-            "tsConfig": "src/tsconfig.spec.json",
-            "karmaConfig": "src/karma.conf.js",
+            "main": "./src/test.ts",
+            "polyfills": "./src/polyfills.ts",
+            "tsConfig": "./src/tsconfig.spec.json",
+            "karmaConfig": "./src/karma.conf.js",
             "styles": [
-              "src/styles.scss",
-              "node_modules/@fortawesome/fontawesome-free/css/all.min.css"
+              "./src/styles.styl",
+              "./node_modules/@fortawesome/fontawesome-free/css/all.min.css"
             ],
             "scripts": [],
             "assets": [
@@ -88,8 +88,8 @@
           "builder": "@angular-devkit/build-angular:tslint",
           "options": {
             "tsConfig": [
-              "src/tsconfig.app.json",
-              "src/tsconfig.spec.json"
+              "./src/tsconfig.app.json",
+              "./src/tsconfig.spec.json"
             ],
             "exclude": [
               "**/node_modules/**"
diff --git a/index.php b/index.php
deleted file mode 100755
index 6fd199e66e..0000000000
--- a/index.php
+++ /dev/null
@@ -1 +0,0 @@
-<?php
diff --git a/package.json b/package.json
index 575ab28722..5320bee764 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
     "ng": "ng",
     "start": "ng serve --host 10.2.95.136",
     "build": "ng build",
+    "build-watch": "ng build --watch",
     "test": "ng test",
     "lint": "ng lint",
     "e2e": "ng e2e"
diff --git a/rest/index.php b/rest/index.php
index cec71d69df..1d43e2168b 100755
--- a/rest/index.php
+++ b/rest/index.php
@@ -24,8 +24,9 @@ require_once("src/core/lang/lang-{$language}.php");
 
 $app = new \Slim\App(['settings' => ['displayErrorDetails' => true, 'determineRouteBeforeAppMiddleware' => true]]);
 
+$GLOBALS['login'] = 'jjane';
 //Authentication
-$app->add(function (\Slim\Http\Request $request, \Slim\Http\Response $response, callable $next) {
+/*$app->add(function (\Slim\Http\Request $request, \Slim\Http\Response $response, callable $next) {
     $login = \SrcCore\controllers\AuthenticationController::authentication();
 
     if (!empty($login)) {
@@ -35,7 +36,7 @@ $app->add(function (\Slim\Http\Request $request, \Slim\Http\Response $response,
     } else {
         return $response->withStatus(401)->withJson(['errors' => 'Authentication Failed']);
     }
-});
+});*/
 
 
 //Attachments
-- 
GitLab