diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-08-24 03:32:21 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-08-24 04:51:24 -0400 |
| commit | 1a0ee4af6538b5486d35730d480d00ca4d9edafb (patch) | |
| tree | 9e49d595ebc5f9b0499e1c7012a7acd9fc126fe3 /src/setup/app.rs | |
| parent | c1d688146956a23366c8e076328bb53351b999b5 (diff) | |
Stop returning body data from `POST /api/setup`.
This API response was always ad-hoc, and the client doesn't use it. To free up some maneuvering room for server refactorings, stop sending it. We can add a response in the future if there's a need.
Diffstat (limited to 'src/setup/app.rs')
| -rw-r--r-- | src/setup/app.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/setup/app.rs b/src/setup/app.rs index 1210175..123cff9 100644 --- a/src/setup/app.rs +++ b/src/setup/app.rs @@ -7,10 +7,7 @@ use crate::{ name::Name, password::Password, token::{Secret, repo::Provider as _}, - user::{ - User, - create::{self, Create}, - }, + user::create::{self, Create}, }; pub struct Setup<'a> { @@ -28,7 +25,7 @@ impl<'a> Setup<'a> { name: &Name, password: &Password, created_at: &DateTime, - ) -> Result<(User, Secret), Error> { + ) -> Result<Secret, Error> { let create = Create::begin(name, password, created_at); let validated = create.validate()?; @@ -42,9 +39,9 @@ impl<'a> Setup<'a> { let secret = tx.tokens().issue(stored.user(), created_at).await?; tx.commit().await?; - let user = stored.publish(self.events); + let _ = stored.publish(self.events); - Ok((user.as_created(), secret)) + Ok(secret) } pub async fn completed(&self) -> Result<bool, sqlx::Error> { |
