max / makenotwork
10 files changed,
+31 insertions,
-31 deletions
| @@ -21,7 +21,7 @@ pub(super) struct AddDomainRequest { | |||
| 21 | 21 | } | |
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | - | /// POST /api/domains — add a custom domain. | |
| 24 | + | /// POST /api/domains: add a custom domain. | |
| 25 | 25 | #[tracing::instrument(skip_all, name = "api::domains::add")] | |
| 26 | 26 | pub(super) async fn add_domain( | |
| 27 | 27 | State(state): State<AppState>, | |
| @@ -54,7 +54,7 @@ pub(super) struct VerifyDomainRequest { | |||
| 54 | 54 | domain_id: CustomDomainId, | |
| 55 | 55 | } | |
| 56 | 56 | ||
| 57 | - | /// POST /api/domains/verify — trigger DNS verification. | |
| 57 | + | /// POST /api/domains/verify: trigger DNS verification. | |
| 58 | 58 | #[tracing::instrument(skip_all, name = "api::domains::verify")] | |
| 59 | 59 | pub(super) async fn verify_domain( | |
| 60 | 60 | State(state): State<AppState>, | |
| @@ -98,7 +98,7 @@ pub(super) async fn verify_domain( | |||
| 98 | 98 | Ok(axum::response::Html("<p class=\"success\">Domain verified successfully. Reload to see changes.</p>".to_string())) | |
| 99 | 99 | } | |
| 100 | 100 | ||
| 101 | - | /// DELETE /api/domains/{id} — remove a custom domain. | |
| 101 | + | /// DELETE /api/domains/{id}: remove a custom domain. | |
| 102 | 102 | #[tracing::instrument(skip_all, name = "api::domains::remove")] | |
| 103 | 103 | pub(super) async fn remove_domain( | |
| 104 | 104 | State(state): State<AppState>, | |
| @@ -123,7 +123,7 @@ pub(super) async fn remove_domain( | |||
| 123 | 123 | Ok(axum::http::StatusCode::NO_CONTENT) | |
| 124 | 124 | } | |
| 125 | 125 | ||
| 126 | - | /// GET /api/domains — get current user's custom domain. | |
| 126 | + | /// GET /api/domains: get current user's custom domain. | |
| 127 | 127 | #[tracing::instrument(skip_all, name = "api::domains::get")] | |
| 128 | 128 | pub(super) async fn get_domain( | |
| 129 | 129 | State(state): State<AppState>, | |
| @@ -159,7 +159,7 @@ pub(super) struct CaddyAskQuery { | |||
| 159 | 159 | domain: String, | |
| 160 | 160 | } | |
| 161 | 161 | ||
| 162 | - | /// GET /api/domains/caddy-ask — Caddy on-demand TLS check. | |
| 162 | + | /// GET /api/domains/caddy-ask: Caddy on-demand TLS check. | |
| 163 | 163 | /// | |
| 164 | 164 | /// Unauthenticated (called by Caddy, not users). Returns 200 if the domain | |
| 165 | 165 | /// is verified, 404 if not. Caddy treats anything outside the 2xx range as |
| @@ -15,7 +15,7 @@ use crate::{ | |||
| 15 | 15 | AppState, | |
| 16 | 16 | }; | |
| 17 | 17 | ||
| 18 | - | /// POST /api/follow/{target_type}/{target_id} — follow a user or project. | |
| 18 | + | /// POST /api/follow/{target_type}/{target_id}: follow a user or project. | |
| 19 | 19 | #[tracing::instrument(skip_all, name = "follows::follow_target")] | |
| 20 | 20 | pub(super) async fn follow_target( | |
| 21 | 21 | State(state): State<AppState>, | |
| @@ -114,7 +114,7 @@ pub(super) async fn follow_target( | |||
| 114 | 114 | .into_response()) | |
| 115 | 115 | } | |
| 116 | 116 | ||
| 117 | - | /// DELETE /api/follow/{target_type}/{target_id} — unfollow a user or project. | |
| 117 | + | /// DELETE /api/follow/{target_type}/{target_id}: unfollow a user or project. | |
| 118 | 118 | #[tracing::instrument(skip_all, name = "follows::unfollow_target")] | |
| 119 | 119 | pub(super) async fn unfollow_target( | |
| 120 | 120 | State(state): State<AppState>, |
| @@ -233,7 +233,7 @@ pub(super) async fn create_guest_checkout( | |||
| 233 | 233 | Ok(response) | |
| 234 | 234 | } | |
| 235 | 235 | ||
| 236 | - | /// OPTIONS /api/checkout/guest/{item_id} — CORS preflight | |
| 236 | + | /// OPTIONS /api/checkout/guest/{item_id}: CORS preflight | |
| 237 | 237 | pub(super) async fn guest_checkout_preflight() -> Response { | |
| 238 | 238 | let mut response = StatusCode::NO_CONTENT.into_response(); | |
| 239 | 239 | let headers = response.headers_mut(); | |
| @@ -247,7 +247,7 @@ pub(super) async fn guest_checkout_preflight() -> Response { | |||
| 247 | 247 | /// GET /download/{download_token} | |
| 248 | 248 | /// | |
| 249 | 249 | /// Download a purchased item using a token from the guest purchase email. | |
| 250 | - | /// No authentication required — the token is the proof of purchase. | |
| 250 | + | /// No authentication required; the token is the proof of purchase. | |
| 251 | 251 | #[tracing::instrument(skip_all, name = "guest_checkout::download")] | |
| 252 | 252 | pub(super) async fn guest_download( | |
| 253 | 253 | State(state): State<AppState>, |
| @@ -27,7 +27,7 @@ pub struct BundleListedRequest { | |||
| 27 | 27 | pub listed: bool, | |
| 28 | 28 | } | |
| 29 | 29 | ||
| 30 | - | /// POST /api/items/{id}/bundle/add -- add an item to this bundle. | |
| 30 | + | /// POST /api/items/{id}/bundle/add: add an item to this bundle. | |
| 31 | 31 | #[tracing::instrument(skip_all, name = "items::bundle_add")] | |
| 32 | 32 | pub async fn bundle_add( | |
| 33 | 33 | State(state): State<AppState>, | |
| @@ -54,7 +54,7 @@ pub async fn bundle_add( | |||
| 54 | 54 | Ok(StatusCode::OK) | |
| 55 | 55 | } | |
| 56 | 56 | ||
| 57 | - | /// DELETE /api/items/{id}/bundle/{child_id} -- remove an item from this bundle. | |
| 57 | + | /// DELETE /api/items/{id}/bundle/{child_id}: remove an item from this bundle. | |
| 58 | 58 | #[tracing::instrument(skip_all, name = "items::bundle_remove")] | |
| 59 | 59 | pub async fn bundle_remove( | |
| 60 | 60 | State(state): State<AppState>, | |
| @@ -70,7 +70,7 @@ pub async fn bundle_remove( | |||
| 70 | 70 | Ok(StatusCode::OK) | |
| 71 | 71 | } | |
| 72 | 72 | ||
| 73 | - | /// PUT /api/items/{id}/bundle/{child_id}/listed -- toggle listed status. | |
| 73 | + | /// PUT /api/items/{id}/bundle/{child_id}/listed: toggle listed status. | |
| 74 | 74 | #[tracing::instrument(skip_all, name = "items::bundle_toggle_listed")] | |
| 75 | 75 | pub async fn bundle_toggle_listed( | |
| 76 | 76 | State(state): State<AppState>, | |
| @@ -103,7 +103,7 @@ pub struct BundleCreateChildResponse { | |||
| 103 | 103 | pub title: String, | |
| 104 | 104 | } | |
| 105 | 105 | ||
| 106 | - | /// POST /api/items/{id}/bundle/create-child — create a new item, add to bundle, set unlisted. | |
| 106 | + | /// POST /api/items/{id}/bundle/create-child: create a new item, add to bundle, set unlisted. | |
| 107 | 107 | #[tracing::instrument(skip_all, name = "items::bundle_create_child")] | |
| 108 | 108 | pub async fn bundle_create_child( | |
| 109 | 109 | State(state): State<AppState>, |
| @@ -484,7 +484,7 @@ struct LicenseVerifyClaims { | |||
| 484 | 484 | item: String, | |
| 485 | 485 | /// Issued at (Unix timestamp) | |
| 486 | 486 | iat: i64, | |
| 487 | - | /// Expiration (Unix timestamp) — 7-day offline grace period | |
| 487 | + | /// Expiration (Unix timestamp); 7-day offline grace period | |
| 488 | 488 | exp: i64, | |
| 489 | 489 | } | |
| 490 | 490 |
| @@ -5,15 +5,15 @@ | |||
| 5 | 5 | //! - **Create / Update**: return the full resource as JSON. | |
| 6 | 6 | //! - **Delete**: return `204 No Content`. | |
| 7 | 7 | //! - **List**: return `{"data": [...]}` via [`ListResponse`](crate::types::ListResponse). | |
| 8 | - | //! - **Action** (no resource to return): `204` or `{"message": "…"}`. | |
| 9 | - | //! - **Errors**: `{"error": "…"}` with appropriate HTTP status (via [`json_error_layer`]). | |
| 8 | + | //! - **Action** (no resource to return): `204` or `{"message": "..."}`. | |
| 9 | + | //! - **Errors**: `{"error": "..."}` with appropriate HTTP status (via [`json_error_layer`]). | |
| 10 | 10 | //! - **HTMX**: response pattern varies by UX need (toast, redirect, partial, | |
| 11 | - | //! save-status) — intentional, not inconsistency. | |
| 11 | + | //! save-status); intentional, not inconsistency. | |
| 12 | 12 | //! - **License key public endpoints** (`/api/keys/*`): stable API contract, | |
| 13 | 13 | //! response shapes are frozen. | |
| 14 | 14 | //! | |
| 15 | 15 | //! List endpoints on the creator dashboard (tiers, keys, codes, chapters, etc.) | |
| 16 | - | //! are intentionally unpaginated — each is scoped to a single project or user, | |
| 16 | + | //! are intentionally unpaginated; each is scoped to a single project or user, | |
| 17 | 17 | //! producing bounded result sets (typically <100 items). | |
| 18 | 18 | ||
| 19 | 19 | mod blog; | |
| @@ -105,7 +105,7 @@ pub(super) async fn verify_blog_post_ownership( | |||
| 105 | 105 | /// | |
| 106 | 106 | /// When `AppError::into_response()` fires it stashes an [`ApiErrorMessage`] in | |
| 107 | 107 | /// the response extensions. This layer checks for that extension and, if | |
| 108 | - | /// present, replaces the HTML body with `{"error": "…"}` while preserving the | |
| 108 | + | /// present, replaces the HTML body with `{"error": "..."}` while preserving the | |
| 109 | 109 | /// original status code. Page routes never hit this layer, so they keep | |
| 110 | 110 | /// getting the full HTML error template. | |
| 111 | 111 | async fn json_error_layer(req: Request, next: Next) -> Response { |
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | //! Project section handlers: tabbed markdown content blocks on projects | |
| 2 | - | //! (privacy policy, terms, FAQ, etc — shared across all platform releases). | |
| 2 | + | //! (privacy policy, terms, FAQ, etc; shared across all platform releases). | |
| 3 | 3 | ||
| 4 | 4 | use axum::{ | |
| 5 | 5 | extract::{Path, State}, |
| @@ -680,7 +680,7 @@ async fn verify_repo_ownership( | |||
| 680 | 680 | Ok(repo) | |
| 681 | 681 | } | |
| 682 | 682 | ||
| 683 | - | /// POST /api/repos/{id}/collaborators — add a collaborator by username. | |
| 683 | + | /// POST /api/repos/{id}/collaborators: add a collaborator by username. | |
| 684 | 684 | #[tracing::instrument(skip_all, name = "api::add_repo_collaborator")] | |
| 685 | 685 | pub async fn add_repo_collaborator( | |
| 686 | 686 | State(state): State<AppState>, | |
| @@ -718,7 +718,7 @@ pub async fn add_repo_collaborator( | |||
| 718 | 718 | ).into_response()) | |
| 719 | 719 | } | |
| 720 | 720 | ||
| 721 | - | /// DELETE /api/repos/{repo_id}/collaborators/{user_id} — remove a collaborator. | |
| 721 | + | /// DELETE /api/repos/{repo_id}/collaborators/{user_id}: remove a collaborator. | |
| 722 | 722 | #[tracing::instrument(skip_all, name = "api::remove_repo_collaborator")] | |
| 723 | 723 | pub async fn remove_repo_collaborator( | |
| 724 | 724 | State(state): State<AppState>, | |
| @@ -738,7 +738,7 @@ pub async fn remove_repo_collaborator( | |||
| 738 | 738 | Ok(htmx_toast_response("Collaborator removed", "success").into_response()) | |
| 739 | 739 | } | |
| 740 | 740 | ||
| 741 | - | /// GET /api/repos/{id}/collaborators — list collaborators (JSON). | |
| 741 | + | /// GET /api/repos/{id}/collaborators: list collaborators (JSON). | |
| 742 | 742 | #[tracing::instrument(skip_all, name = "api::list_repo_collaborators")] | |
| 743 | 743 | pub async fn list_repo_collaborators( | |
| 744 | 744 | State(state): State<AppState>, |
| @@ -28,7 +28,7 @@ pub struct SshKeyResponse { | |||
| 28 | 28 | pub created_at: String, | |
| 29 | 29 | } | |
| 30 | 30 | ||
| 31 | - | /// GET /api/users/me/ssh-keys/list — HTMX partial for the SSH keys list. | |
| 31 | + | /// GET /api/users/me/ssh-keys/list: HTMX partial for the SSH keys list. | |
| 32 | 32 | #[tracing::instrument(skip_all, name = "ssh_keys::list_keys_html")] | |
| 33 | 33 | pub(super) async fn list_keys_html( | |
| 34 | 34 | State(state): State<AppState>, | |
| @@ -42,7 +42,7 @@ pub(super) async fn list_keys_html( | |||
| 42 | 42 | Ok(axum::response::Html(html)) | |
| 43 | 43 | } | |
| 44 | 44 | ||
| 45 | - | /// GET /api/users/me/ssh-keys — list the authenticated user's SSH keys. | |
| 45 | + | /// GET /api/users/me/ssh-keys: list the authenticated user's SSH keys. | |
| 46 | 46 | #[tracing::instrument(skip_all, name = "ssh_keys::list_keys")] | |
| 47 | 47 | pub(super) async fn list_keys( | |
| 48 | 48 | State(state): State<AppState>, | |
| @@ -63,7 +63,7 @@ pub(super) async fn list_keys( | |||
| 63 | 63 | Ok(Json(crate::types::ListResponse { data })) | |
| 64 | 64 | } | |
| 65 | 65 | ||
| 66 | - | /// POST /api/users/me/ssh-keys — add a new SSH key. | |
| 66 | + | /// POST /api/users/me/ssh-keys: add a new SSH key. | |
| 67 | 67 | #[tracing::instrument(skip_all, name = "ssh_keys::add_key")] | |
| 68 | 68 | pub(super) async fn add_key( | |
| 69 | 69 | State(state): State<AppState>, | |
| @@ -121,7 +121,7 @@ pub(super) async fn add_key( | |||
| 121 | 121 | .into_response()) | |
| 122 | 122 | } | |
| 123 | 123 | ||
| 124 | - | /// DELETE /api/users/me/ssh-keys/{id} — remove an SSH key. | |
| 124 | + | /// DELETE /api/users/me/ssh-keys/{id}: remove an SSH key. | |
| 125 | 125 | #[tracing::instrument(skip_all, name = "ssh_keys::delete_key")] | |
| 126 | 126 | pub(super) async fn delete_key( | |
| 127 | 127 | State(state): State<AppState>, |
| @@ -48,7 +48,7 @@ pub(super) struct UpdateTierRequest { | |||
| 48 | 48 | pub is_active: bool, | |
| 49 | 49 | } | |
| 50 | 50 | ||
| 51 | - | /// POST /api/projects/{id}/tiers — create a subscription tier | |
| 51 | + | /// POST /api/projects/{id}/tiers: create a subscription tier | |
| 52 | 52 | #[tracing::instrument(skip_all, name = "subscriptions::create_tier")] | |
| 53 | 53 | pub(super) async fn create_tier( | |
| 54 | 54 | State(state): State<AppState>, | |
| @@ -122,7 +122,7 @@ pub(super) async fn create_tier( | |||
| 122 | 122 | })) | |
| 123 | 123 | } | |
| 124 | 124 | ||
| 125 | - | /// GET /api/projects/{id}/tiers — list tiers for a project | |
| 125 | + | /// GET /api/projects/{id}/tiers: list tiers for a project | |
| 126 | 126 | #[tracing::instrument(skip_all, name = "subscriptions::list_tiers")] | |
| 127 | 127 | pub(super) async fn list_tiers( | |
| 128 | 128 | State(state): State<AppState>, | |
| @@ -145,7 +145,7 @@ pub(super) async fn list_tiers( | |||
| 145 | 145 | Ok(Json(ListResponse { data })) | |
| 146 | 146 | } | |
| 147 | 147 | ||
| 148 | - | /// PUT /api/tiers/{id} — update a tier's name, description, and active status | |
| 148 | + | /// PUT /api/tiers/{id}: update a tier's name, description, and active status | |
| 149 | 149 | #[tracing::instrument(skip_all, name = "subscriptions::update_tier")] | |
| 150 | 150 | pub(super) async fn update_tier( | |
| 151 | 151 | State(state): State<AppState>, | |
| @@ -187,7 +187,7 @@ pub(super) async fn update_tier( | |||
| 187 | 187 | })) | |
| 188 | 188 | } | |
| 189 | 189 | ||
| 190 | - | /// DELETE /api/tiers/{id} — soft-delete a tier (set is_active=false) | |
| 190 | + | /// DELETE /api/tiers/{id}: soft-delete a tier (set is_active=false) | |
| 191 | 191 | #[tracing::instrument(skip_all, name = "subscriptions::delete_tier")] | |
| 192 | 192 | pub(super) async fn delete_tier( | |
| 193 | 193 | State(state): State<AppState>, |