Skip to content

Instantly share code, notes, and snippets.

View way2datta's full-sized avatar
🐌
Not only working software but also well crafted software.

Dattatray Kale way2datta

🐌
Not only working software but also well crafted software.
View GitHub Profile
@way2datta
way2datta / Poorly formatted and poorly named urls and http methods
Last active November 21, 2018 15:33
Poorly formatted and poorly named urls and http methods
HTTP GET http://localhost:3000/userJWTValidation
HTTP GET http://localhost:3000/JwtValidation
HTTP GET http://localhost:3000/creationOfUserDetails
HTTP GET http://localhost:3000/getAllusersDetails
HTTP GET http://localhost:3000/fetchUserDetails
HTTP GET http://localhost:3000/deletionOfUserDetails
HTTP GET http://localhost:3000/updationOfUserDetails
HTTP GET http://localhost:3000/getExpenseCategoryOfUsers
HTTP GET http://localhost:3000/getExpenseCategoryOfUser
HTTP GET http://localhost:3000/deletionExpenseCategoryOfUser
@way2datta
way2datta / Route-expense-tracker-after.js
Last active November 21, 2018 15:00
Well formatted readable urls for rest api's
import { Router } from 'express';
import { LoginController } from '../controllers/loginController';
import { AuthController } from "../controllers/authController";
import { UserController } from "../controllers/userController";
import { ExpenseCategoryController } from "../controllers/expenseCategoryController";
import { ExpenseController } from "../controllers/expenseController";
const router = Router();
const loginController = new LoginController();
@way2datta
way2datta / well-formatted-and-readable
Last active November 21, 2018 14:58
Well formatted readable urls
HTTP POST http://localhost:3000/login
HTTP POST http://localhost:3000/authorize
HTTP POST http://localhost:3000/register
HTTP GET http://localhost:3000/users
HTTP GET http://localhost:3000/users/:id
HTTP DELETE http://localhost:3000/users/:id
HTTP PUT http://localhost:3000/users/:id
HTTP POST http://localhost:3000/users
HTTP GET http://localhost:3000/users/:id/expenses/categories
HTTP GET http://localhost:3000/users/:id/expenses/categories/:categoryId
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (request, response) => response.send('Hello World!'));
app.get('/users', (request, response) => response.send("Get users"));
app.get('/users/:id', (request, response) => response.send("Get user by id"));
using System;
using System.Collections.Generic;
namespace NMart.Billing
{
internal class NMartStore
{
private static Dictionary<string, int> CategoryGstRatesInPercentage = new Dictionary<string, int>();
private static Dictionary<string, string> ItemsInCategory = new Dictionary<string, string>();
using System;
using System.Collections.Generic;
namespace NMart.Billing
{
internal class NMartStore
{
private static Dictionary<string, int> CategoryGstRatesInPercentage = new Dictionary<string, int>();
private static Dictionary<string, string> ItemsInCategory = new Dictionary<string, string>();
using System;
using System.Collections.Generic;
using System.Linq;
namespace Assignment
{
internal class Program
{
private static Dictionary<string, int> CGR = new Dictionary<string, int>();
private static Dictionary<string, string> iCat = new Dictionary<string, string>();