Skip to content

Commit

Permalink
v1.1.2 - Fixed Landing Page
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SayanShankhari committed Nov 24, 2023
1 parent 2b6546e commit b1ad2ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 10 additions & 0 deletions app/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = `<body>
<h2>Please use the following paramerets after default URL</h2>
<h3>?type=version&user={Your GitHub Username}&path={User or Organization Name}&repo={Repository Name}&branch={Branch Name}</h3>
</body>`;
return response;
}

request_inputs = helper .re_format_request_inputs (request_inputs);

if (!helper .validate_request_inputs (request_inputs)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit b1ad2ab

Please sign in to comment.