Initial commit
This commit is contained in:
38
docs/zagros/admin/KYC-confirm.md
Normal file
38
docs/zagros/admin/KYC-confirm.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# KYC: admin
|
||||
###### Sprint: ?
|
||||
|
||||
### Outcome:
|
||||
admin can verify or reject(change state(selfie,poa)) of documents.
|
||||
|
||||
|
||||
### Implementation description:
|
||||
|
||||
#### Endpoints:
|
||||
|
||||
POST {$domain}/api/v2/barong/admin/users/documents
|
||||
|
||||
#### File destination:
|
||||
{$Dalan_Path}/app/api/v2/admin/users.rb
|
||||
|
||||
#### Commits:
|
||||
bd7f980
|
||||
|
||||
#### What did we implement:
|
||||
for admin apis, we should check access of user(authorization) at first.
|
||||
after checking authorization, we checked existence of document and profile for related user.
|
||||
update state of document.
|
||||
we wrote some callbacks for every doc type to update labels state .
|
||||
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
title: admin document update
|
||||
User->>Ranj: user and new state of doc
|
||||
Ranj-->>Dalan: post /admin/users/documents params
|
||||
Dalan->>Ranj: 400, message: 'Required params are empty'
|
||||
Dalan->>Ranj: 401, message: 'Invalid bearer token', 'admin.ability.not_permitted'
|
||||
Dalan->>Ranj: 404, message: 'doesnt exist'(document.user_doesnt_exist,document.document_doesnt_exist)
|
||||
Dalan->>Ranj: 422, message: 'Validation errors'
|
||||
Dalan->>Ranj: 200, message: 'New phone was added'
|
||||
Ranj->>User: show admin result
|
||||
```
|
||||
28
docs/zagros/admin/treasury-list.md
Normal file
28
docs/zagros/admin/treasury-list.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Admin API: list treasuries
|
||||
|
||||
### Outcome:
|
||||
list (Array) of users treasuries
|
||||
|
||||
### Implementation description:
|
||||
|
||||
#### Endpoints:
|
||||
GET {$domain}/api/v2/barong/admin/profiles/treasury/list
|
||||
|
||||
#### File destination:
|
||||
- {$Dalan_Path}/app/api/v2/admin/profiles.rb
|
||||
|
||||
#### Commits:
|
||||
- 0654aa1a04
|
||||
|
||||
#### What did we implement:
|
||||
We implemented one API in the panel that admin users can see a list of users' treasuries by entering user_id.<br />
|
||||
also, admin users can filter responses as IBAN or card treasuries by sending kind value.
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
|
||||
Title: list treasuries
|
||||
note over Admin,Dalan: **kind** is optional
|
||||
Admin->>Dalan:GET user_uid, kind
|
||||
Dalan->>Admin:Array of treasuries [id, title, state, data, created_at, updated_at]
|
||||
```
|
||||
Reference in New Issue
Block a user