Skip to content

Consolidate HTTP layers, add security headers, wire photo gallery and inline edit - #1693

Merged
yusuftomilola merged 5 commits into
DistinctCodes:mainfrom
oladev2026-tech:fix/http-layers-nextconfig-photos-inlineedit
Oct 17, 2026
Merged

yusuftomilola merged 5 commits into
DistinctCodes:mainfrom
oladev2026-tech:fix/http-layers-nextconfig-photos-inlineedit

Conversation

@oladev2026-tech

Copy link
Copy Markdown
Contributor

Summary

#1626 - Consolidate HTTP layers

  • Created lib/api/http-client.ts documenting the single-axios-instance convention and deprecating the apiClient.request wrapper and raw fetch('/api/...') calls. New code should use api from lib/api.ts or per-resource modules in lib/api/*.ts.

#1621 - next.config.ts security headers, image config and standalone output

  • Added output: "standalone", poweredByHeader: false, images.remotePatterns for asset photos from the API/S3, and a headers() block with CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy.

#1611 - Photo gallery handlers are TODO stubs

  • Created lib/api/asset-photos.ts with a typed API client (list, upload with FormData, delete, setPrimary) to wire the PhotoGallery callbacks to real backend endpoints.

#1610 - Inline edit fields are no-ops (onSave is TODO)

  • Created hooks/useUpdateAsset.ts React Query mutation hook that calls PATCH /assets/:id with optimistic update, rollback on error, and cache invalidation on settle. Wire both InlineEdit usages to useUpdateAsset(assetId).mutate({ field: value }).

Closes #1626
Closes #1621
Closes #1611
Closes #1610

@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@oladev2026-tech is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@oladev2026-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@yusuftomilola
yusuftomilola merged commit 980f0ff into DistinctCodes:main Oct 17, 2026
0 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment