Skip to content

Commit 83981bc

Browse files
authored
Merge pull request #132 from javedh-dev/dev
Bugfix : Fuel Adding bug fix
2 parents 981e93d + 519f3b0 commit 83981bc

File tree

3 files changed

+48
-5
lines changed

3 files changed

+48
-5
lines changed

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ TRACKTOR_DEMO_MODE=false
1212
FORCE_DATA_SEED=false
1313
TRACKTOR_DISABLE_AUTH=false
1414

15-
# Security
16-
AUTH_PIN="123456"
17-
1815
# CORS Configuration
1916
CORS_ORIGINS="*"
2017

changelogs/1.0.0.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Release Notes – v1.0.0 (2025-12-17)
2+
3+
## Major Changes
4+
5+
- Migrated from separate backend/frontend to a full-stack SvelteKit app.
6+
- Switched package management from npm to pnpm.
7+
- Refactored middleware using the Chain of Responsibility pattern.
8+
- Removed extra controller layer and cleaned up middlewares.
9+
- Removed all shadcn components and updated UI components.
10+
- Removed SSR and improved UI.
11+
- Replaced common package APIResponse and updated imports.
12+
- Added user/password authentication (single user mode).
13+
- Added migration script and demo user seeding for auth.
14+
- Dropped legacy auth table and removed crypto dependency from frontend forms.
15+
16+
## Features & Improvements
17+
18+
- Added support for attachments for all logs and entries.
19+
- Added alerts for expiry of PUCC and insurance.
20+
- Added functionality to export/import data in JSON format.
21+
- Added file upload limitation.
22+
- Added HTTP mode and defaulted logging requests as true.
23+
- Added preview for attached files and image upload improvements.
24+
- Added --host to preview command.
25+
- Created new Dockerfile and improved Docker support (fixed CORS).
26+
- Refactored environment variable handling (separate client/server).
27+
- Removed dotenvx dependency and updated build configuration.
28+
- Upgraded Node.js to 24 and pnpm to 10 in CI workflow.
29+
- Updated GitHub Actions and improved CI/CD.
30+
31+
## Bug Fixes
32+
33+
- Fixed data seeding and data table rendering issues.
34+
- Fixed warnings, linting issues, and broken components.
35+
- Fixed error in mileage calculation.
36+
- Fixed editing in attachment and form submitting issues.
37+
- Fixed broken env for demo mode and improved logging.
38+
- Fixed auth check and made auth single user.
39+
- Fixed loggings and added DB patch step in initialization.
40+
41+
## Other
42+
43+
- Removed tests and updated environment variables.
44+
- General cleanup and code quality improvements.
45+
46+
For a full list of changes, see the [compare view](https://github.com/javedh-dev/tracktor/compare/0.5.1...1.0.0).

src/routes/api/vehicles/[id]/fuel-logs/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ export const POST: RequestHandler = async (event) => {
4040
const body = event.locals.requestBody || (await event.request.json());
4141

4242
// Basic validation for fuel log data
43-
if (!body.date || !body.amount || !body.cost) {
43+
if (!body.date || !body.fuelAmount || !body.cost) {
4444
throw error(400, 'Date, amount, and cost are required');
4545
}
4646

47-
if (typeof body.amount !== 'number' || body.amount <= 0) {
47+
if (typeof body.fuelAmount !== 'number' || body.fuelAmount <= 0) {
4848
throw error(400, 'Amount must be a positive number');
4949
}
5050

0 commit comments

Comments
 (0)