Code Monkey home page Code Monkey logo

gg_final's Introduction

GG Final - Rails with SQLite3

API application created by using ruby on rails and sqlite3 database to store data and make it helpfull for the manage orders.

Installation

Run this command to your terminal:

bundle install
bundle exec rails db:migrate

(optional) only use for dummy data

bulid exec rails db:seed

Run the server

Run this command to your terminal:

bundle exec rails s
bundle exec whenever --update-crontab

or, if you using replit just click run button.

Testing

For testing with rspec run this command:

bundle exec rspec -fd

Documentation

Root Domain

https://Gigih-Family-Catering-dakunesu.gojek22.repl.co/

next, sample url shortened path and parameters only.


Kategori

  • for update data, use parameters for what you want to change
Method URL Path Parameter Description
GET /api/kategori - list kategori
GET /api/kategori/:id - detail kategori
POST /api/kategori
  • nama
buat kategori
PATH /api/kategori/:id
  • nama
ubah kategori
DELETE /api/kategori/:id - hapus kategori


Menu

  • for update data, use parameters for what you want to change
Method URL Path Parameter Description
GET /api/menu - list menu
GET /api/menu/:id - detail menu
POST /api/menu
  • nama
  • harga
  • deskripsi
  • kategori_id
buat menu
PATH /api/menu/:id
  • nama
  • harga
  • deskripsi
  • kategori_id
ubah menu
DELETE /api/menu/:id - hapus menu


Order

  • for update data, use parameters for what you want to change
Method URL Path Parameter Description
GET /api/order - list order
GET /api/order/:id - detail order
POST /api/order
  • email
buat order
POST /api/order/:id/paid - paid order
PATH /api/order/:id
  • email
ubah order
DELETE /api/order/:id - hapus order


Order Menu

  • for update data, use parameters for what you want to change
Method URL Path Parameter Description
GET /api/order/:order_id/menu - list order menu
GET /api/order/:order_id/menu/:menu_id - detail order menu
POST /api/order/:order_id/menu
  • menu_id
  • porsi
buat order menu
PATH /api/order/:order_id/menu/:menu_id
  • menu_id
  • porsi
ubah order menu
DELETE /api/order/:order_id/menu/:menu_id - hapus order menu


Report

  • clear the parameters on the date filter for today only.
Method URL Path Parameter Description
GET /api/report?filter=date
  • s = tanggal awal
  • e = tanggal akhir
report by date
GET /api/report?filter=harga
  • s = harga minimal
  • e = harga maksimal
report by price
GET /api/report?filter=email
  • q = email
report by email


Unpaid Order

for order status below 5 p.m today, it will automatically be changed to unpaid / canceled.

or, you can use this to change the status semi-automatically.

Method URL Path Parameter Description
POST /api/order/unpaid - unpaid all new order under 5 p.m.

gg_final's People

Contributors

sachnun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.