- Replace events+expenses with flat purchases table - Add warranty_months, return_days, product_name fields - Remove currency conversion, CSV/PDF reporting, event filing - Simplify auth (no onboarding/department/profile) - Update AI extraction prompts for product/warranty info - Update all branding: templates, install.sh, Makefile, service file
10 lines
357 B
Go
10 lines
357 B
Go
package handlers
|
|
|
|
import "strings"
|
|
|
|
// normalizeImagePath strips a legacy "storage/" prefix if present, so that
|
|
// the template can safely build "/storage/{filename}" URLs regardless of
|
|
// whether the database entry was stored as "uuid.jpg" or "storage/uuid.jpg".
|
|
func normalizeImagePath(path string) string {
|
|
return strings.TrimPrefix(path, "storage/")
|
|
}
|