Add PATCH and DELETE/api/v0/account/handle endpoints
Remove /api/v0/server-did and /api/v0/account/:username/did endpoints. We should use DoH instead now.
Verify that all usernames are DNS-valid in server requests
Correctly return StatusCode::CONFLICT if there's any DB conflicts (e.g. username taken, handle taken, etc.)
Add Cache-Control headers to DoH responses
Separate the AccountRecord DB record type from an Account type that can be returned in requests
Rename RootAccount to AccountAndAuth
Factor out DnsServer from dns/mod.rs into dns/server.rs
Rename a bunch of upper-case DNS* type names into the usual rust convention of Dns*
CLI
Detect when in account rename the user uses a . in the username and walk the user through associating a handle in that case (this is somewhat of a hacky UX, it probably needs some work in the future)
Normalize usernames (lowercase, punycode, etc.) in the CLI, support IDN
Share the Account type across CLI & server
Rename AccountResponse to AccountAndAuth
Use the AccountAndAuth type instead of (AccountInfo, Did, Vec<User>) (these types are actually isomorphic)
Docs
Add the DoH route and other missing routes to design/api.md and make it up-to-date.
Actually also add routes that were missing from the swagger UI: patch_username, delete_account, get_capabilities
Add #[schema(value_type = ...)] annotations to remove errors from the /swagger-ui route
Add #[schema(example = ...)] annotations so everything has sensible examples
Tests
Add a test_authority for DnsServer so we can locally mock-test setting 'foreign' DNS records
Refactor tests to be more readable, less repeated code
Don't assert properties that are assumed to work for a particular test and covered by other tests
Put request helpers in account.rs into a submodule
Server
handle
column toaccounts
tablePATCH
andDELETE
/api/v0/account/handle
endpoints/api/v0/server-did
and/api/v0/account/:username/did
endpoints. We should use DoH instead now.StatusCode::CONFLICT
if there's any DB conflicts (e.g. username taken, handle taken, etc.)Cache-Control
headers to DoH responsesAccountRecord
DB record type from anAccount
type that can be returned in requestsRootAccount
toAccountAndAuth
DnsServer
fromdns/mod.rs
intodns/server.rs
DNS*
type names into the usual rust convention ofDns*
CLI
account rename
the user uses a.
in the username and walk the user through associating a handle in that case (this is somewhat of a hacky UX, it probably needs some work in the future)Account
type across CLI & serverAccountResponse
toAccountAndAuth
AccountAndAuth
type instead of(AccountInfo, Did, Vec<User>)
(these types are actually isomorphic)Docs
design/api.md
and make it up-to-date.patch_username
,delete_account
,get_capabilities
#[schema(value_type = ...)]
annotations to remove errors from the/swagger-ui
route#[schema(example = ...)]
annotations so everything has sensible examplesTests
test_authority
forDnsServer
so we can locally mock-test setting 'foreign' DNS recordsassert
properties that are assumed to work for a particular test and covered by other testsaccount.rs
into a submodule