@@ -9,6 +9,7 @@ import { getTournamentSource } from "../../handler/manager/settings/getTournamen
99import { addTournamentSource } from "../../handler/manager/settings/addTournamentSource.js" ;
1010import { registry } from "../../lib/openapi.js" ;
1111import { z } from "zod" ;
12+ import { getTeamEmail } from "../../handler/manager/settings/getTeamEmail.js" ;
1213
1314const updateTeamEmails = rateLimit ( {
1415 windowMs : 2 * 60 * 1000 ,
@@ -38,7 +39,10 @@ registry.registerPath({
3839 } ,
3940 } ,
4041 responses : {
41- 200 : { description : "Updated" , content : { "text/plain" : { schema : z . string ( ) } } } ,
42+ 200 : {
43+ description : "Updated" ,
44+ content : { "text/plain" : { schema : z . string ( ) } } ,
45+ } ,
4246 400 : { description : "Invalid request" } ,
4347 401 : { description : "Unauthorized" } ,
4448 500 : { description : "Server error" } ,
@@ -89,7 +93,10 @@ registry.registerPath({
8993 } ,
9094 } ,
9195 responses : {
92- 200 : { description : "Added" , content : { "text/plain" : { schema : z . string ( ) } } } ,
96+ 200 : {
97+ description : "Added" ,
98+ content : { "text/plain" : { schema : z . string ( ) } } ,
99+ } ,
93100 400 : { description : "Invalid request" } ,
94101 401 : { description : "Unauthorized" } ,
95102 403 : { description : "Not affiliated with a team" } ,
@@ -104,7 +111,10 @@ registry.registerPath({
104111 tags : [ "Manager - Settings" ] ,
105112 summary : "Get tournament source" ,
106113 responses : {
107- 200 : { description : "Tournament source" , content : { "application/json" : { schema : z . array ( z . string ( ) ) } } } ,
114+ 200 : {
115+ description : "Tournament source" ,
116+ content : { "application/json" : { schema : z . array ( z . string ( ) ) } } ,
117+ } ,
108118 401 : { description : "Unauthorized" } ,
109119 500 : { description : "Server error" } ,
110120 } ,
@@ -116,9 +126,20 @@ registry.registerPath({
116126 path : "/v1/manager/settings/tournamentsource" ,
117127 tags : [ "Manager - Settings" ] ,
118128 summary : "Add tournament source" ,
119- request : { body : { content : { "application/json" : { schema : z . object ( { tournaments : z . array ( z . string ( ) ) } ) } } } } ,
129+ request : {
130+ body : {
131+ content : {
132+ "application/json" : {
133+ schema : z . object ( { tournaments : z . array ( z . string ( ) ) } ) ,
134+ } ,
135+ } ,
136+ } ,
137+ } ,
120138 responses : {
121- 200 : { description : "Added" , content : { "text/plain" : { schema : z . string ( ) } } } ,
139+ 200 : {
140+ description : "Added" ,
141+ content : { "text/plain" : { schema : z . string ( ) } } ,
142+ } ,
122143 400 : { description : "Invalid request" } ,
123144 401 : { description : "Unauthorized" } ,
124145 500 : { description : "Server error" } ,
@@ -133,7 +154,10 @@ registry.registerPath({
133154 summary : "Update team email" ,
134155 request : { query : z . object ( { email : z . string ( ) . email ( ) } ) } ,
135156 responses : {
136- 200 : { description : "Verification sent" , content : { "text/plain" : { schema : z . string ( ) } } } ,
157+ 200 : {
158+ description : "Verification sent" ,
159+ content : { "text/plain" : { schema : z . string ( ) } } ,
160+ } ,
137161 400 : { description : "Invalid request" } ,
138162 401 : { description : "Unauthorized" } ,
139163 404 : { description : "Team not found" } ,
@@ -153,6 +177,7 @@ router.post("/teamsource", addTeamSource);
153177router . get ( "/tournamentsource" , getTournamentSource ) ;
154178router . post ( "/tournamentsource" , addTournamentSource ) ;
155179
180+ router . get ( "/teamemail" , getTeamEmail ) ;
156181router . put ( "/teamemail" , updateTeamEmails , updateTeamEmail ) ;
157182
158183export default router ;
0 commit comments