• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 13117020702
89%

Build:
DEFAULT BRANCH: main
Ran 03 Feb 2025 03:35PM UTC
Jobs 2
Files 790
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
13117020702

push

github

web-flow
feat(users): add route logic (#2315)

Adds the route layer for users, adding a service, controller and the relative entities.

All of the following routes are relative to CRUD of users based on the verified signer address, set by the existing SiWe implementation.

### `GET` `/v1/users`

Retrieves a user and the associated wallets relative.

- `200` - User and wallets found.
```ts
type Return = {
  id: number, // User ID
  status: UserStatus,
  wallets: Array<{
    id: number; // Wallet ID
    address: `0x${string}`
  }>
}
```
- `401` - Signer address not provided
- `404` - Wallet not found

### `DELETE` `/v1/users`

Deletes a user associated.

- `200` - User deleted
- `401` - Signer address not provided
- `404` - Wallet not found

### `POST` `/v1/users/wallet`

Adds a user and wallet.

- `201` - User and wallet created
```ts
type Return = {
  id: number // User ID
}
```
- `401` - Signer address not provided
- `409` - Wallet already exists

### `POST` `/v1/users/wallet/:walletAddress`

- `201` - Wallet added to user
```ts
type Return = {
  id: number // Wallet ID
}
```
- `401` - Signer address not provided
- `409` - Wallet already exists
- `404` - User not found

### `DELETE` `/v1/users/wallet/:walletAddress`

Removes a wallet from a user, deleting the wallet.

- `200` - Wallet removed from user and deleted
- `401` - Signer address not provided
- `409` - Cannot remove the current wallet
- `404` - User OR provided wallet not found

## Changes

- Create `UsersService`
- Complete `UsersController`
  - Create `CreatedUserWithWallet` entity
  - Create `UserWithWallets` entity
- Add appropriate test coverage, replacing tests of user repository

2934 of 3550 branches covered (82.65%)

Branch coverage included in aggregate %.

9806 of 10459 relevant lines covered (93.76%)

513.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-test:cov - 13117020702.1 03 Feb 2025 03:37PM UTC 1547
91.82
GitHub Action Run
2 run-test:e2e:cov - 13117020702.2 03 Feb 2025 03:35PM UTC 1402
50.67
GitHub Action Run
Source Files on build 13117020702
  • Tree
  • List 790
  • Changed 695
  • Source Changed 7
  • Coverage Changed 216
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #13117020702
  • 20fb1558 on github
  • Prev Build on main (#13054997353)
  • Next Build on main (#13117453007)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc