This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
import routes from './routes/rest-api'; | |
const app = express(); | |
const port = 3000; | |
const hostUrl = "http://localhost:3000" | |
app.use('/', routes); | |
routes.stack.forEach(function (element) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Use Cases** | |
- User can register his/her account. | |
- An account owner can log into the system. | |
- An account owner can view, add, update, and delete category for expenses. | |
- An account owner can view, add, update, and delete expense. |
OlderNewer