Usulan Commit Message
fix: Implementasi retry mechanism dan error handling untuk database connections Deskripsi: Menambahkan withRetry wrapper pada berbagai API routes untuk menangani transient database errors dan meningkatkan reliabilitas koneksi Memperbaiki error handling pada notification, authentication, dan user validation endpoints dengan response 503 untuk database connection errors Update prisma.ts dengan konfigurasi logging yang lebih baik dan datasources configuration Menambahkan validasi input parameters pada beberapa endpoints Update dokumentasi QWEN.md dengan commit message format dan comment standards Update .env.example dengan connection pool settings yang lebih lengkap File yang diubah: src/lib/prisma.ts — Konfigurasi Prisma client & logging src/app/api/admin/notifikasi/count/route.tsx src/app/api/auth/mobile-login/route.ts src/app/api/mobile/notification/[id]/route.ts src/app/api/user-validate/route.ts Dan 27 file API routes lainnya (penerapan withRetry secara konsisten) QWEN.md — Dokumentasi commit & comment standards .env.example — Database connection pool configuration ### No Issue
This commit is contained in:
64
QWEN.md
64
QWEN.md
@@ -120,14 +120,6 @@ The team follows a structured Git workflow:
|
||||
- `style`: Styling changes
|
||||
- `perf`: Performance improvements
|
||||
|
||||
### Code Standards
|
||||
- TypeScript with strict mode enabled
|
||||
- Component header comments with file description, creator, date
|
||||
- Function comments with parameter and return value descriptions
|
||||
- Custom type interface comments
|
||||
- Error handling comments
|
||||
- Complex logic comments
|
||||
|
||||
### Commit Message Format
|
||||
```
|
||||
type: Short description
|
||||
@@ -140,6 +132,62 @@ Body:
|
||||
References: #issue-number
|
||||
```
|
||||
|
||||
**Example:**
|
||||
```
|
||||
feat: Tambahkan fitur kalkulator
|
||||
|
||||
Deskripsi:
|
||||
- Menambahkan fungsi penambahan, pengurangan, perkalian, dan pembagian
|
||||
- Memperbolehkan pengguna untuk memasukkan dua angka dan melakukan operasi matematika
|
||||
|
||||
Fixes #12
|
||||
```
|
||||
|
||||
### Code Standards
|
||||
- TypeScript with strict mode enabled
|
||||
- Component header comments with file description, creator, date
|
||||
- Function comments with parameter and return value descriptions
|
||||
- Custom type interface comments
|
||||
- Error handling comments
|
||||
- Complex logic comments
|
||||
|
||||
### Comment Standards
|
||||
|
||||
**File Header:**
|
||||
```typescript
|
||||
/**
|
||||
* Nama File: app.ts
|
||||
* Deskripsi: Ini adalah file utama aplikasi.
|
||||
* Pembuat: John Doe
|
||||
* Tanggal: 27 Juli 2023
|
||||
*/
|
||||
```
|
||||
|
||||
**Function Comments:**
|
||||
```typescript
|
||||
/**
|
||||
* Fungsi untuk menambahkan dua angka.
|
||||
* @param {number} a - Angka pertama.
|
||||
* @param {number} b - Angka kedua.
|
||||
* @returns {number} Hasil penjumlahan a dan b.
|
||||
*/
|
||||
function addNumbers(a: number, b: number): number {
|
||||
return a + b;
|
||||
}
|
||||
```
|
||||
|
||||
**Custom Type Comments:**
|
||||
```typescript
|
||||
/**
|
||||
* Interface untuk merepresentasikan informasi pelanggan.
|
||||
*/
|
||||
interface Customer {
|
||||
id: number; // ID pelanggan
|
||||
name: string; // Nama pelanggan
|
||||
age?: number; // Umur pelanggan (opsional)
|
||||
}
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
### Main Directories
|
||||
|
||||
Reference in New Issue
Block a user