Skip to content

Commit 7e689d5

Browse files
committed
docs: update documentation for global settings and email integration with improved formatting
1 parent 1370711 commit 7e689d5

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

services/backend/GLOBAL_SETTINGS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,25 +954,29 @@ The `getBoolean()` method accepts these string values:
954954
### Usage Patterns
955955

956956
#### Simple Value Retrieval
957+
957958
```typescript
958959
const value = await GlobalSettings.get('key.name');
959960
const valueWithDefault = await GlobalSettings.get('key.name', 'default');
960961
```
961962

962963
#### Type-Safe Retrieval
964+
963965
```typescript
964966
const isEnabled = await GlobalSettings.getBoolean('feature.enabled', false);
965967
const maxSize = await GlobalSettings.getNumber('upload.max_size', 10);
966968
const apiUrl = await GlobalSettings.getUrl('api.endpoint');
967969
```
968970

969971
#### Batch Retrieval
972+
970973
```typescript
971974
const settings = await GlobalSettings.getMultiple(['key1', 'key2', 'key3']);
972975
const groupSettings = await GlobalSettings.getGroupValues('smtp');
973976
```
974977

975978
#### Validation and Checks
979+
976980
```typescript
977981
if (await GlobalSettings.isSet('api.key')) {
978982
const apiKey = await GlobalSettings.getRequired('api.key');

services/backend/Mail.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The email system provides a comprehensive solution for sending templated emails
1414

1515
## Architecture
1616

17-
```
17+
```text
1818
src/email/
1919
├── emailService.ts # Main email service with SMTP integration
2020
├── templateRenderer.ts # Pug template compilation and rendering
@@ -540,27 +540,35 @@ export class DeploymentService {
540540
### Common Issues
541541

542542
1. **SMTP Configuration Not Found**
543-
```
543+
544+
```text
544545
Error: SMTP configuration is not complete. Please configure SMTP settings in global settings.
545546
```
547+
546548
**Solution**: Configure SMTP settings in the global settings interface.
547549

548550
2. **Template Not Found**
549-
```
551+
552+
```text
550553
Error: Template 'welcome' not found at /path/to/templates/welcome.pug
551554
```
555+
552556
**Solution**: Ensure the template file exists in the templates directory.
553557

554558
3. **Invalid Email Address**
555-
```
559+
560+
```text
556561
Error: Invalid email address
557562
```
563+
558564
**Solution**: Validate email addresses before sending.
559565

560566
4. **SMTP Connection Failed**
561-
```
567+
568+
```text
562569
Error: Connection timeout
563570
```
571+
564572
**Solution**: Check SMTP server settings and network connectivity.
565573

566574
### Debug Mode

services/backend/test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ npm install
3131
- Test files must follow the naming convention: `<TEST_NAME>.e2e.test.ts`.
3232
- Tests run sequentially in alphabetical order to ensure proper dependencies.
3333

34-
### Current Test Files (in execution order):
34+
### Current Test Files (in execution order)
3535

3636
1. **`setup.e2e.test.ts`** - Database setup and initialization
3737
2. **`user-registration.e2e.test.ts`** - User registration and role assignment

0 commit comments

Comments
 (0)