From 3d6d8e0595b570df705de07620cf6703117d38f5 Mon Sep 17 00:00:00 2001 From: OudomMunint <108245473+OudomMunint@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:31:25 +1000 Subject: [PATCH] API Boiler plate, Removed smoothscroll.js --- .github/workflows/main.yml | 2 +- API/API.js | 18 ++++++++++++++++++ js/smoothscroll.js | 0 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 API/API.js delete mode 100755 js/smoothscroll.js diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a0ca907..80784a68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,4 +36,4 @@ jobs: - name: Create Release uses: ncipollo/release-action@v1.12.0 with: - tag: v1.5.5.1 \ No newline at end of file + tag: v1.5.5.2 \ No newline at end of file diff --git a/API/API.js b/API/API.js new file mode 100644 index 00000000..5a821071 --- /dev/null +++ b/API/API.js @@ -0,0 +1,18 @@ +const API = { + // Get all proj + async getAllPosts() { + const response = await fetch( + "" + ); + const data = await response.json(); + return data; + }, + // Get proj via id + async getPostById(id) { + const response = await fetch( + `` + ); + const data = await response.json(); + return data; + }, + }; diff --git a/js/smoothscroll.js b/js/smoothscroll.js deleted file mode 100755 index e69de29b..00000000