Skip to content

Commit de1cce8

Browse files
committed
Add "read-only" tag to read only endpoints
1 parent ed22393 commit de1cce8

File tree

12 files changed

+22
-20
lines changed

12 files changed

+22
-20
lines changed

app/api/endpoints/dns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def dns_add_record(data: DNSAddRecord):
118118
) from exc
119119

120120

121-
@router.get("/templates", summary="List DNS templates")
121+
@router.get("/templates", summary="List DNS templates", tags=["read-only"])
122122
async def dns_templates():
123123
"""
124124
List available DNS templates.
@@ -133,7 +133,7 @@ async def dns_templates():
133133
) from exc
134134

135135

136-
@router.get("/list", summary="List DNS zones or records")
136+
@router.get("/list", summary="List DNS zones or records", tags=["read-only"])
137137
async def dns_list(
138138
dns_domain: str | None = Query(
139139
None,

app/api/endpoints/ftp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def ftp_quota(data: FTPQuota):
9191
) from exc
9292

9393

94-
@router.get("/list", summary="List FTP accounts")
94+
@router.get("/list", summary="List FTP accounts", tags=["read-only"])
9595
async def ftp_list():
9696
"""
9797
List all FTP accounts.

app/api/endpoints/info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
router = APIRouter(prefix="/info", tags=["info"])
1111

1212

13-
@router.get("/limits", summary="Account limits")
13+
@router.get("/limits", summary="Account limits", tags=["read-only"])
1414
async def info_limits():
1515
"""
1616
Return account limits information.
@@ -25,7 +25,7 @@ async def info_limits():
2525
) from exc
2626

2727

28-
@router.get("/account", summary="Basic account info")
28+
@router.get("/account", summary="Basic account info", tags=["read-only"])
2929
async def info_account():
3030
"""
3131
Return basic account information.

app/api/endpoints/mail.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async def mail_quota(data: MailQuota):
140140
) from exc
141141

142142

143-
@router.get("/list", summary="List mail domains or accounts")
143+
@router.get("/list", summary="List mail domains or accounts", tags=["read-only"])
144144
async def mail_list(
145145
email_domain: str | None = Query(
146146
None, description="Optional email domain to filter results"
@@ -196,7 +196,9 @@ async def mail_whitelist_del(
196196
) from exc
197197

198198

199-
@router.get("/whitelist/list", summary="List mail whitelist domains")
199+
@router.get(
200+
"/whitelist/list", summary="List mail whitelist domains", tags=["read-only"]
201+
)
200202
async def mail_whitelist_list():
201203
"""
202204
List all whitelisted mail domains.
@@ -228,7 +230,7 @@ async def mail_dkim_sign(data: MailDKIM):
228230
) from exc
229231

230232

231-
@router.get("/dkim/dns/{domain}", summary="Get DKIM DNS record")
233+
@router.get("/dkim/dns/{domain}", summary="Get DKIM DNS record", tags=["read-only"])
232234
async def mail_dkim_dns(
233235
domain: str = Path(..., description="Domain to get DKIM DNS record for"),
234236
print_record: bool = Query(

app/api/endpoints/mongo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def mongo_passwd(data: MongoPasswd):
6262
raise HTTPException(status_code=400, detail=str(exc)) from exc
6363

6464

65-
@router.get("/list", summary="List MongoDB databases and users")
65+
@router.get("/list", summary="List MongoDB databases and users", tags=["read-only"])
6666
async def mongo_list():
6767
"""
6868
List MongoDB databases and users.

app/api/endpoints/mysql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ async def mysql_passwd(data: MySQLPasswd):
189189
) from exc
190190

191191

192-
@router.get("/list", summary="List MySQL databases and users")
192+
@router.get("/list", summary="List MySQL databases and users", tags=["read-only"])
193193
async def mysql_list():
194194
"""
195195
List MySQL databases and users.

app/api/endpoints/pgsql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async def pgsql_extensions(data: PgSQLExtension):
8181
raise HTTPException(status_code=400, detail=str(exc)) from exc
8282

8383

84-
@router.get("/list", summary="List PostgreSQL databases and users")
84+
@router.get("/list", summary="List PostgreSQL databases and users", tags=["read-only"])
8585
async def pgsql_list():
8686
"""
8787
List PostgreSQL databases and users.

app/api/endpoints/port.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async def port_del(
5656
raise HTTPException(status_code=400, detail=str(exc)) from exc
5757

5858

59-
@router.get("/list", summary="List reserved ports")
59+
@router.get("/list", summary="List reserved ports", tags=["read-only"])
6060
async def port_list():
6161
"""
6262
List all reserved ports.

app/api/endpoints/repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ async def repo_account_passwd(data: RepoAccountPasswd):
151151
raise HTTPException(status_code=400, detail=str(exc)) from exc
152152

153153

154-
@router.get("/list", summary="List repositories or accounts")
154+
@router.get("/list", summary="List repositories or accounts", tags=["read-only"])
155155
async def repo_list(
156156
repo_type: RepoType | None = Query(
157157
None,

app/api/endpoints/ssl.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async def ssl_www_del(
6767
raise HTTPException(status_code=400, detail=str(exc)) from exc
6868

6969

70-
@router.post("/www/get", summary="Get WWW SSL certificate")
70+
@router.post("/www/get", summary="Get WWW SSL certificate", tags=["read-only"])
7171
async def ssl_www_get(data: SSLWWWGet):
7272
"""
7373
Get certificate and key for a WWW SSL entry.
@@ -84,7 +84,7 @@ async def ssl_www_get(data: SSLWWWGet):
8484
raise HTTPException(status_code=400, detail=str(exc)) from exc
8585

8686

87-
@router.get("/www/list", summary="List WWW SSL certificates")
87+
@router.get("/www/list", summary="List WWW SSL certificates", tags=["read-only"])
8888
async def ssl_www_list():
8989
"""
9090
List all WWW SSL certificates.
@@ -134,7 +134,7 @@ async def ssl_mail_del(ssl_ip: str = Path(..., description="SSL IP address")):
134134
raise HTTPException(status_code=400, detail=str(exc)) from exc
135135

136136

137-
@router.post("/mail/get", summary="Get mail SSL certificate")
137+
@router.post("/mail/get", summary="Get mail SSL certificate", tags=["read-only"])
138138
async def ssl_mail_get(data: SSLMailGet):
139139
"""
140140
Get certificate and key for a mail SSL entry.
@@ -148,7 +148,7 @@ async def ssl_mail_get(data: SSLMailGet):
148148
raise HTTPException(status_code=400, detail=str(exc)) from exc
149149

150150

151-
@router.get("/mail/list", summary="List mail SSL certificates")
151+
@router.get("/mail/list", summary="List mail SSL certificates", tags=["read-only"])
152152
async def ssl_mail_list():
153153
"""
154154
List all mail SSL certificates.

0 commit comments

Comments
 (0)