Skip to content

Removal of public share/link feature - #77

Merged
GitTimeraider merged 3 commits into
mainfrom
develop
Jul 31, 2026
Merged

Removal of public share/link feature#77
GitTimeraider merged 3 commits into
mainfrom
develop

Conversation

@GitTimeraider

Copy link
Copy Markdown
Owner

Removal of public share/link feature
Invoicing software really shouldnt be open to the public and sending companies URLs to click on is about as shady. Even security-wise you can't argue that sending a link of your invoice is safer than sending it as PDF.
With the focus on sending invoices through email, the entire public link front- and back-end is not needed anymore for my application of this software and more of a legacy leftover thing from Invio.
Thus this will be removed, making space for more suefull options in the future.

Copilot AI review requested due to automatic review settings July 31, 2026 14:39
@GitTimeraider
GitTimeraider merged commit 361b92a into main Jul 31, 2026
2 of 3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the public invoice share/link feature end-to-end (UI, backend routes/controllers, and DB schema) and updates documentation to reflect a direct-email delivery focus.

Changes:

  • Removes the frontend public invoice page and all “publish/unpublish/copy public link” UI/actions from the invoice detail page.
  • Removes backend public invoice endpoints and publish/unpublish admin endpoints, plus related controller/util code.
  • Drops share_token from the invoices schema/migrations and updates DB migration logic to recreate invoices to the current schema.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Updates feature description to remove public share links and emphasize email delivery.
frontend/src/routes/public/invoices/[token]/+page.svelte Public invoice page content removed (currently left as an empty routable page).
frontend/src/routes/public/invoices/[token]/+page.server.ts Removes server load that passed the token to the public invoice page.
frontend/src/routes/invoices/[id]/+page.svelte Removes publish/unpublish UI, banner, and copy-link behavior from invoice details.
frontend/src/routes/invoices/[id]/+page.server.ts Removes publish/unpublish form actions and “published” banner flag.
frontend/src/lib/i18n/locales/en.json Removes translation keys related to publishing/public links.
backend/src/utils/uuid.ts Removes share-token generator utility.
backend/src/types/index.ts Removes shareToken from the Invoice type.
backend/src/routes/public.ts Deletes public invoice endpoints, leaving only non-invoice public endpoints (e.g., XML profiles).
backend/src/routes/admin.ts Removes publish/unpublish routes and disables share-link generation in email composition.
backend/src/database/migrations.sql Drops share_token column/index from invoices table schema for new DBs.
backend/src/database/migrations_clean.sql Drops share_token column/index from invoices table schema for clean migrations.
backend/src/database/init.ts Updates invoice table migration to recreate to current schema (including removing share_token).
backend/src/controllers/invoices.ts Removes share-token creation/lookup/publish/unpublish logic; adjusts inserts/selects accordingly (with one duplication insert bug).
backend/src/controllers/invoices_clean.ts Removes legacy share-token usage in the “clean” controller implementation.
Suppressed comments (1)

backend/src/database/init.ts:475

  • This migration function now upgrades the invoices table to the current schema (including dropping share_token and ensuring new columns), but the post-migration log message still says it only supports "voided" and "complete". Updating the log message will avoid misleading operational diagnostics.
    database.execute("COMMIT");
    console.log(
      " Migrated invoices table to support 'voided' and 'complete' statuses",
    );

Comment on lines 1967 to 1970
const origin = c.req.header("origin") ||
c.req.header("referer")?.replace(/\/$/, "") || "";
const shareLink = invoice.shareToken && origin
? `${origin}/public/invoices/${invoice.shareToken}`
: null;
const shareLink = null;

Comment on lines 1168 to 1172
original.paymentTerms || null,
original.notes || null,
newShare,
"",
now,
now,
</div>
</main>
</div>
 No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants