From 1ecbce4b1668210b6655207c922410598d09def6 Mon Sep 17 00:00:00 2001 From: syui Date: Tue, 2 Apr 2024 21:31:04 +0900 Subject: [PATCH] fix --- ent/ogent/oas_response_encoders_gen.go | 2 ++ tmp/ogent/oas_response_encoders_gen.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ent/ogent/oas_response_encoders_gen.go b/ent/ogent/oas_response_encoders_gen.go index 067a954..8432973 100644 --- a/ent/ogent/oas_response_encoders_gen.go +++ b/ent/ogent/oas_response_encoders_gen.go @@ -808,6 +808,7 @@ func encodeListGroupUsersResponse(response ListGroupUsersRes, w http.ResponseWri } func encodeListMaResponse(response ListMaRes, w http.ResponseWriter, span trace.Span) error { + w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai") switch response := response.(type) { case *ListMaOKApplicationJSON: w.Header().Set("Content-Type", "application/json") @@ -1416,6 +1417,7 @@ func encodeReadGroupResponse(response ReadGroupRes, w http.ResponseWriter, span } func encodeReadMaResponse(response ReadMaRes, w http.ResponseWriter, span trace.Span) error { + w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai") switch response := response.(type) { case *MaRead: w.Header().Set("Content-Type", "application/json") diff --git a/tmp/ogent/oas_response_encoders_gen.go b/tmp/ogent/oas_response_encoders_gen.go index 067a954..8432973 100644 --- a/tmp/ogent/oas_response_encoders_gen.go +++ b/tmp/ogent/oas_response_encoders_gen.go @@ -808,6 +808,7 @@ func encodeListGroupUsersResponse(response ListGroupUsersRes, w http.ResponseWri } func encodeListMaResponse(response ListMaRes, w http.ResponseWriter, span trace.Span) error { + w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai") switch response := response.(type) { case *ListMaOKApplicationJSON: w.Header().Set("Content-Type", "application/json") @@ -1416,6 +1417,7 @@ func encodeReadGroupResponse(response ReadGroupRes, w http.ResponseWriter, span } func encodeReadMaResponse(response ReadMaRes, w http.ResponseWriter, span trace.Span) error { + w.Header().Set("Access-Control-Allow-Origin", "https://manga.syui.ai") switch response := response.(type) { case *MaRead: w.Header().Set("Content-Type", "application/json")