Remove test client creation functionality from admin extension
Client registration will now be handled by the DCA client extension.
The admin extension focuses solely on:
- Reading existing clients
- Managing deposits (pending → confirmed workflow)
- Monitoring DCA activity
Test client creation code preserved in 'feature/test-client-creation' branch.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
76807663db
commit
dfc2dd695c
3 changed files with 0 additions and 47 deletions
|
|
@ -286,34 +286,6 @@ window.app = Vue.createApp({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Test Client Creation (temporary for testing)
|
|
||||||
async createTestClient() {
|
|
||||||
try {
|
|
||||||
const testData = {
|
|
||||||
user_id: this.g.user.id,
|
|
||||||
wallet_id: this.g.user.wallets[0].id,
|
|
||||||
username: this.g.user.username || `user_${this.g.user.id.substring(0, 8)}`,
|
|
||||||
dca_mode: 'flow'
|
|
||||||
}
|
|
||||||
|
|
||||||
const { data: newClient } = await LNbits.api.request(
|
|
||||||
'POST',
|
|
||||||
'/satmachineadmin/api/v1/dca/clients',
|
|
||||||
this.g.user.wallets[0].adminkey,
|
|
||||||
testData
|
|
||||||
)
|
|
||||||
|
|
||||||
this.dcaClients.push(newClient)
|
|
||||||
|
|
||||||
this.$q.notify({
|
|
||||||
type: 'positive',
|
|
||||||
message: 'Test client created successfully!',
|
|
||||||
timeout: 5000
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
LNbits.utils.notifyApiError(error)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Quick Deposit Methods
|
// Quick Deposit Methods
|
||||||
async sendQuickDeposit() {
|
async sendQuickDeposit() {
|
||||||
|
|
|
||||||
|
|
@ -95,15 +95,6 @@
|
||||||
<q-icon name="info" color="orange" />
|
<q-icon name="info" color="orange" />
|
||||||
</template>
|
</template>
|
||||||
No DCA clients registered yet. Clients must first install and configure the DCA client extension.
|
No DCA clients registered yet. Clients must first install and configure the DCA client extension.
|
||||||
<template v-slot:action>
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
color="orange"
|
|
||||||
label="Create Test Client"
|
|
||||||
@click="createTestClient"
|
|
||||||
size="sm"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
10
views_api.py
10
views_api.py
|
|
@ -12,7 +12,6 @@ from starlette.exceptions import HTTPException
|
||||||
|
|
||||||
from .crud import (
|
from .crud import (
|
||||||
# DCA CRUD operations
|
# DCA CRUD operations
|
||||||
create_dca_client,
|
|
||||||
get_dca_clients,
|
get_dca_clients,
|
||||||
get_dca_client,
|
get_dca_client,
|
||||||
update_dca_client,
|
update_dca_client,
|
||||||
|
|
@ -36,7 +35,6 @@ from .crud import (
|
||||||
)
|
)
|
||||||
from .models import (
|
from .models import (
|
||||||
# DCA models
|
# DCA models
|
||||||
CreateDcaClientData,
|
|
||||||
DcaClient,
|
DcaClient,
|
||||||
UpdateDcaClientData,
|
UpdateDcaClientData,
|
||||||
CreateDepositData,
|
CreateDepositData,
|
||||||
|
|
@ -85,14 +83,6 @@ async def api_get_dca_client(
|
||||||
# Admin extension only reads existing clients and manages their deposits
|
# Admin extension only reads existing clients and manages their deposits
|
||||||
|
|
||||||
|
|
||||||
# TEMPORARY: Test client creation endpoint (remove in production)
|
|
||||||
@satmachineadmin_api_router.post("/api/v1/dca/clients", status_code=HTTPStatus.CREATED)
|
|
||||||
async def api_create_test_dca_client(
|
|
||||||
data: CreateDcaClientData,
|
|
||||||
wallet: WalletTypeInfo = Depends(require_admin_key),
|
|
||||||
) -> DcaClient:
|
|
||||||
"""Create a test DCA client (temporary for testing)"""
|
|
||||||
return await create_dca_client(data)
|
|
||||||
|
|
||||||
|
|
||||||
@satmachineadmin_api_router.get("/api/v1/dca/clients/{client_id}/balance")
|
@satmachineadmin_api_router.get("/api/v1/dca/clients/{client_id}/balance")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue