Skip to content

Commit

Permalink
Added CORS to openfeedback
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Jun 27, 2024
1 parent 8e99706 commit dbae256
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/rest/OpenFeedback.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import java.util.List;
import java.util.Map;

import org.jboss.resteasy.reactive.RestResponse;

import io.quarkiverse.renarde.Controller;
import io.quarkiverse.renarde.router.Router;
import jakarta.ws.rs.Path;
Expand Down Expand Up @@ -43,7 +45,7 @@ public static class Social {
}

@Path("/openfeedback")
public Root openFeedback(){
public RestResponse<Root> openFeedback(){
Root ret = new Root();

List<Talk> talks = Talk.listAll();
Expand Down Expand Up @@ -95,6 +97,6 @@ public Root openFeedback(){
ret.speakers.put(speaker.id.toString(), ofspeaker);
}

return ret;
return RestResponse.ResponseBuilder.ok(ret).header("Access-Control-Allow-Origin", "*").build();
}
}

0 comments on commit dbae256

Please sign in to comment.