feat: add authentication token handling for design persistence
This commit is contained in:
@@ -27,6 +27,9 @@ export default defineEventHandler(async (event) => {
|
||||
});
|
||||
}
|
||||
|
||||
// Extract the authorization token from the incoming request
|
||||
const authHeader = getHeader(event, "authorization");
|
||||
|
||||
const payload = {
|
||||
designId: body.designId,
|
||||
templateId: body.templateId,
|
||||
@@ -43,6 +46,7 @@ export default defineEventHandler(async (event) => {
|
||||
const result = await $fetch("/designs", {
|
||||
baseURL: backendUrl,
|
||||
method: "POST",
|
||||
headers: authHeader ? { Authorization: authHeader } : {},
|
||||
body: payload,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user