Initial web app consumption/integration (#5)
Co-authored-by: Joe Arndt <jmarndt@users.noreply.github.com> Reviewed-on: #5
This commit is contained in:
parent
3f258bcd33
commit
df6733caa9
41 changed files with 385 additions and 353 deletions
|
|
@ -12,6 +12,6 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"name": "First Cat"
|
||||
"name": "Gas"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,27 +12,10 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"year": "2026",
|
||||
"month": "01",
|
||||
"day": "02",
|
||||
"cents": 1000,
|
||||
"description": "With cat, no subcat or merchant or tags",
|
||||
"category": {
|
||||
"id": "72644e00-f1fa-4029-bd9c-2e82eb965aeb"
|
||||
}
|
||||
// "subCategory": {
|
||||
// "id": "270ceaea-9cb8-4c6a-846f-ea35ed4d12f7"
|
||||
// },
|
||||
// "merchant": {
|
||||
// "id": "61246db4-3110-4fe2-bdab-d819b8fd0705"
|
||||
// },
|
||||
// "tags": [
|
||||
// {
|
||||
// "id": "2616f724-f3ce-46df-8b30-897f147f6b74"
|
||||
// },
|
||||
// {
|
||||
// "id": "16ed84e0-2d17-45c7-ada8-6fe7f8cc8720"
|
||||
// }
|
||||
// ]
|
||||
"date": "2026-01-03",
|
||||
"cents": 101111,
|
||||
"note": "Gas",
|
||||
"categoryId": "db21acbb-0e3e-4ea1-89e1-3d52e5d72cb4",
|
||||
"merchantId": "b9028a32-1305-4699-8611-d8fd812ebc04"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
meta {
|
||||
name: Expenses
|
||||
seq: 3
|
||||
}
|
||||
|
||||
auth {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
meta {
|
||||
name: Health
|
||||
name: Healthcheck
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
|
@ -12,6 +12,6 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"name": "Merchant Three"
|
||||
"name": "Casey's"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
meta {
|
||||
name: Merchants
|
||||
seq: 3
|
||||
seq: 4
|
||||
}
|
||||
|
||||
auth {
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
meta {
|
||||
name: LOC DELETE Sub-category
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}/{{resourceId}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
resourceId: cbf30070-9ff7-419f-a567-f7d145be445b
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
meta {
|
||||
name: LOC GET Sub-categories
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
meta {
|
||||
name: LOC GET Sub-category By ID
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}/{{resourceId}}
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
resourceId: 1d6d2842-b271-489b-bd93-e3ceaee5a139
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
meta {
|
||||
name: LOC POST Sub-category
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"name": "Sub-category Three"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
meta {
|
||||
name: LOC PUT Sub-category
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{localBaseUrl}}/{{resourcePath}}
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"id": "1d6d2842-b271-489b-bd93-e3ceaee5a139",
|
||||
"name": "Merchant One"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
meta {
|
||||
name: Sub-categories
|
||||
seq: 4
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
resourcePath: sub-categories
|
||||
}
|
||||
|
|
@ -12,6 +12,6 @@ post {
|
|||
|
||||
body:json {
|
||||
{
|
||||
"name": "Tag Three"
|
||||
"name": "Joe"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
80
bruno/Common Cents/seed-data.js
Normal file
80
bruno/Common Cents/seed-data.js
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
const postFakeCategories = [
|
||||
{
|
||||
name: "Utilities"
|
||||
},
|
||||
{
|
||||
name: "Automotive:Gasoline"
|
||||
},
|
||||
{
|
||||
name: "Groceries:Food"
|
||||
}
|
||||
];
|
||||
const postFakeMerchants = [
|
||||
{
|
||||
name: "Walmart"
|
||||
},
|
||||
{
|
||||
name: "Casey's"
|
||||
},
|
||||
{
|
||||
name: "Electric Company"
|
||||
}
|
||||
];
|
||||
const postFakeTags = [
|
||||
{
|
||||
name: "Truck"
|
||||
},
|
||||
{
|
||||
name: "Van"
|
||||
}
|
||||
];
|
||||
const postFakeExpenses = [
|
||||
{
|
||||
year: "2025",
|
||||
month: "12",
|
||||
day: "28",
|
||||
cents: 12153,
|
||||
category: {
|
||||
name: "Utilities"
|
||||
},
|
||||
merchant: {
|
||||
name: "Electric Company"
|
||||
}
|
||||
},
|
||||
{
|
||||
year: "2025",
|
||||
month: "12",
|
||||
day: "31",
|
||||
cents: 5500,
|
||||
category: {
|
||||
name: "Automotive:Gasoline"
|
||||
},
|
||||
merchant: {
|
||||
name: "Casey's"
|
||||
},
|
||||
tags: [
|
||||
{
|
||||
name: "Truck"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
console.log({ postFakeCategories, postFakeMerchants, postFakeTags, postFakeExpenses });
|
||||
|
||||
|
||||
// async function fetchData(url) {
|
||||
// try {
|
||||
// const response = await fetch(url);
|
||||
// if (!response.ok) {
|
||||
// throw new Error('Network response was not ok');
|
||||
// }
|
||||
// const data = await response.json(); // Wait for the JSON data to be parsed
|
||||
// console.log(data);
|
||||
// } catch (error) {
|
||||
// console.error('Error:', error);
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Call the async function
|
||||
// fetchData('https://api.example.com/data');
|
||||
Loading…
Add table
Add a link
Reference in a new issue