Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile migration consent #219

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,73 @@ Get the email from the entry of the `safeAddress` in the database.
- `403` Verification failed
- `404` User entry not found

### Get user profile migration consent

**Request:**

`GET /api/users/<safeAddress>/get-profile-migration-consent`

Get the profile migration consent from the entry of the `safeAddress` in the database.

**Parameters:**

```
{
address: <string>,
signature: <string>,
}
```

- `address`: Public address of user wallet
- `signature`: Signed data payload of this request via the users keypair. The data contains: `address + safeAddress`.

**Verification steps:**

1. Check if the `signature` can be verified successfully.
2. Check if `address` is owner of the given Safe.

**Errors:**

- `400` Parameters missing or malformed
- `403` Verification failed
- `404` User entry not found

### Update profile migration consent for a user entry

**Request:**

`POST /api/users/<safeAddress>/update-profile-migration-consent`

Update an entry in the database, assigning a value to `profileMigrationConsent` associated to a `safeAddress`.

**Parameters:**

```
{
address: <string>,
signature: <string>,
data: {
safeAddress: <string>,
profileMigrationConsent: <string>
}
}
```

- `address`: Public address of user wallet
- `signature`: Signed data payload of this request via the users keypair. The data contains: `address + safeAddress + username`.
- `data/safeAddress`: Public address of the owned Safe of the user
- `data/profileMigrationConsent`: Whether or not the user consents the profile migration

**Verification steps:**

1. Check if the `signature` can be verified successfully.
3. Check if `address` is owner of the given Safe.

**Errors:**

- `400` Parameters missing or malformed, or entry does not exist
- `403` Verification failed

### Search news database by date

Resolves multiple news items starting from newest item in the database, via:
Expand Down
Loading
Loading