From b1ad2abe834bca195378cf237a2220efc9dfafa0 Mon Sep 17 00:00:00 2001 From: Sayan Shankhari Date: Fri, 24 Nov 2023 11:46:57 +0530 Subject: [PATCH] v1.1.2 - Fixed Landing Page Added default message in landing page for appropriate URL request for users. On branch master Your branch is up to date with 'origin/master'. Changes to be committed: modified: README.md modified: app/controllers/index.js modified: package.json --- README.md | 1 + app/controllers/index.js | 10 ++++++++++ package.json | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ec7152..1fe01ee 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ http://127.0.0.1:3000/?type=version&user={Your GitHub Username}&path={User or Or [![Stable Version](localhost:3000/?type=version&user=sayan&path=thescienceuniverse&repo=markdown-badge-crafter&branch=master)](https://github.com/TheScienceUniverse/markdown-badge-crafter) [![Development Version](https://thescienceuniverse.github.io/API/?get=version&branch=dev)](https://github.com/TheScienceUniverse/markdown-badge-crafter) +[![Node.js CI](https://github.com/TheScienceUniverse/markdown-badge-crafter/actions/workflows/node.js.yml/badge.svg)](https://github.com/TheScienceUniverse/markdown-badge-crafter/actions/workflows/node.js.yml) [![GitHub Issues](https://img.shields.io/github/issues/TheScienceUniverse/markdown-badge-crafter.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/TheScienceUniverse/markdown-badge-crafter/issues) [![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/DEYW7vZkm7) diff --git a/app/controllers/index.js b/app/controllers/index.js index 44240a4..8aab57c 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -8,6 +8,16 @@ global .raw_data = ""; async function handle_request (request_inputs) { let response = {}; + if (request_inputs .size == 0) { + response ["status"] = 200; + response ["type"] = "text/html"; + response ["data"] = ` +

Please use the following paramerets after default URL

+

?type=version&user={Your GitHub Username}&path={User or Organization Name}&repo={Repository Name}&branch={Branch Name}

+ `; + return response; + } + request_inputs = helper .re_format_request_inputs (request_inputs); if (!helper .validate_request_inputs (request_inputs)) { diff --git a/package.json b/package.json index 49e8d18..d0b28d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdown-badge-crafter" - , "version": "1.0.0" + , "version": "1.1.2" , "description": "Badge (shield) crafter for Markdown pages and links" , "main": "index.js" , "scripts": {