Skip to content

Commit ecd065d

Browse files
committed
docs: update docs accordingly
1 parent f8c9733 commit ecd065d

File tree

2 files changed

+44
-6
lines changed

2 files changed

+44
-6
lines changed

src/modules/activity/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ fn add_tags(activity_id: String, tags: Vec<String>) -> Result<(), ActivityError>
5555
fn remove_tags(activity_id: String, tags: Vec<String>) -> Result<(), ActivityError>
5656
fn get_tags(activity_id: String) -> Result<Vec<String>, ActivityError>
5757
fn get_all_unique_tags() -> Result<Vec<String>, ActivityError>
58+
59+
// Database wipe
60+
fn activity_wipe_all() -> Result<(), ActivityError>
5861
```
5962

6063
## Usage Examples
@@ -141,7 +144,10 @@ func manageActivities() {
141144

142145
// Delete activity
143146
let deleted = try deleteActivityById(activityId: "tx123")
144-
147+
148+
// Wipe all activity data (use with caution!)
149+
try activityWipeAll()
150+
145151
} catch {
146152
print("Error: \(error)")
147153
}
@@ -245,7 +251,10 @@ fun manageActivities() {
245251

246252
// Delete activity
247253
val deleted = deleteActivityById(activityId = "ln456")
248-
254+
255+
// Wipe all activity data (use with caution!)
256+
activityWipeAll()
257+
249258
} catch (e: Exception) {
250259
println("Error: $e")
251260
}
@@ -353,7 +362,10 @@ try:
353362

354363
# Delete activity
355364
deleted = delete_activity_by_id("tx123")
356-
365+
366+
# Wipe all activity data (use with caution!)
367+
activity_wipe_all()
368+
357369
except Exception as e:
358370
print(f"Error: {e}")
359371
```

src/modules/blocktank/README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ async fn get_gift(gift_id: String) -> Result<IGift, BlocktankError>
131131

132132
// Get payment information
133133
async fn get_payment(payment_id: String) -> Result<IBtBolt11Invoice, BlocktankError>
134+
135+
// Database management
136+
async fn blocktank_remove_all_orders() -> Result<(), BlocktankError>
137+
async fn blocktank_remove_all_cjit_entries() -> Result<(), BlocktankError>
138+
async fn blocktank_wipe_all() -> Result<(), BlocktankError>
134139
```
135140

136141
## Usage Examples
@@ -259,7 +264,14 @@ func manageBlocktank() async {
259264
let payment = try await getPayment(paymentId: paymentId)
260265
print("Payment state: \(payment.state)")
261266
}
262-
267+
268+
// Database management - remove specific blocktank data
269+
try await blocktankRemoveAllOrders()
270+
try await blocktankRemoveAllCjitEntries()
271+
272+
// Or wipe all blocktank data at once (use with caution!)
273+
try await blocktankWipeAll()
274+
263275
} catch {
264276
print("Error: \(error)")
265277
}
@@ -385,7 +397,14 @@ suspend fun manageBlocktank() {
385397
val payment = getPayment(paymentId = paymentId)
386398
println("Payment state: ${payment.state}")
387399
}
388-
400+
401+
// Database management - remove specific blocktank data
402+
blocktankRemoveAllOrders()
403+
blocktankRemoveAllCjitEntries()
404+
405+
// Or wipe all blocktank data at once (use with caution!)
406+
blocktankWipeAll()
407+
389408
} catch (e: Exception) {
390409
println("Error: $e")
391410
}
@@ -511,7 +530,14 @@ async def manage_blocktank():
511530
if gift.bolt11_payment_id:
512531
payment = await get_payment(payment_id=gift.bolt11_payment_id)
513532
print(f"Payment state: {payment.state}")
514-
533+
534+
# Database management - remove specific blocktank data
535+
await blocktank_remove_all_orders()
536+
await blocktank_remove_all_cjit_entries()
537+
538+
# Or wipe all blocktank data at once (use with caution!)
539+
await blocktank_wipe_all()
540+
515541
except Exception as e:
516542
print(f"Error: {e}")
517543

0 commit comments

Comments
 (0)