Skip to content

Commit

Permalink
move products.json down a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lannonbr committed Dec 14, 2024
1 parent 4041d04 commit 522bd48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ temp/
# Public directory
public

mvc/models/products.json
mvc/models/data/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A small app to check how old my tech products I own are.
## Setup

- Clone this repo.
- Create a JSON file at `mvc/models/products.json` with an array of products as such:
- Create a JSON file at `mvc/models/data/products.json` with an array of products as such:

```json
[
Expand Down
2 changes: 1 addition & 1 deletion mvc/models/products.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const dayjs = require("dayjs");

function getProducts() {
let products = require("./products.json");
let products = require("./data/products.json");

products = products.sort((a, b) => {
return dayjs(a.purchaseDate).diff(dayjs(b.purchaseDate));
Expand Down

0 comments on commit 522bd48

Please sign in to comment.