From be36363e39d01c7359265a3c8ac04e553a706b7f Mon Sep 17 00:00:00 2001 From: TLRZ Seyfferth Date: Wed, 24 Jan 2018 17:13:21 +0100 Subject: [PATCH] =?UTF-8?q?=C3=BCberarbeitetet=20serviceworker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend.php | 2 +- js/app.js | 2 +- serviceWorker.js | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend.php b/backend.php index de4f4fb..38ace29 100644 --- a/backend.php +++ b/backend.php @@ -14,7 +14,7 @@ if (empty($_POST) && empty(file_get_contents('php://input'))) { if ($_GET['controller'] == "Article"){ if ($_GET['action'] == "store") { $json = file_get_contents('php://input'); - $file = fopen(__DIR__.'/data/test_articles.json','w'); + $file = fopen(__DIR__.'/data/articles.json','w'); fwrite($file, $json); fclose($file); echo "Artikel wurden gespeichert."; diff --git a/js/app.js b/js/app.js index 477059a..3de080d 100644 --- a/js/app.js +++ b/js/app.js @@ -57,7 +57,7 @@ var app = new Vue({ }) }, loadArticles: function() { - this.$http.get('./data/test_articles.json') + this.$http.get('./data/articles.json') .then(response => { return response.json();}) .then(json => { json.forEach(element => { diff --git a/serviceWorker.js b/serviceWorker.js index 408e25e..f87620f 100644 --- a/serviceWorker.js +++ b/serviceWorker.js @@ -1,6 +1,5 @@ var APP_SHELL_CACHE = "inventur_shell-v2"; var urlsToCache = [ - '.', 'css/lib/materialize.min.css', 'js/lib/materialize.min.js', 'js/lib/accounting.min.js', @@ -10,7 +9,7 @@ var urlsToCache = [ 'js/lib/vue.min.js', 'js/lib/vue-resource.min.js', 'fonts/Roboto/*', - //'js/model/inventory_article.js' + 'data/articles.json' ]; self.addEventListener('install', function(event){