mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-03-09 15:40:05 +00:00
Fix typo
This commit is contained in:
parent
d6be576785
commit
8dcc64d1a4
1 changed files with 1 additions and 2 deletions
|
@ -1843,14 +1843,13 @@ def shorewall_close(*, params: Shorewallparams, current_user: User = Depends(get
|
||||||
return {'result': 'done', 'reason': 'changes applied', 'route': 'shorewallclose'}
|
return {'result': 'done', 'reason': 'changes applied', 'route': 'shorewallclose'}
|
||||||
|
|
||||||
class SipALGparams(BaseModel):
|
class SipALGparams(BaseModel):
|
||||||
enable: Bool = Query(True, title="Enable or disable SIP ALG")
|
enable: bool = Query(True, title="Enable or disable SIP ALG")
|
||||||
|
|
||||||
@app.post('/sipalg', summary="Enable/Disable SIP ALG")
|
@app.post('/sipalg', summary="Enable/Disable SIP ALG")
|
||||||
def sipalg(*, params: SipALGparams, current_user: User = Depends(get_current_user)):
|
def sipalg(*, params: SipALGparams, current_user: User = Depends(get_current_user)):
|
||||||
if current_user.permissions == "ro":
|
if current_user.permissions == "ro":
|
||||||
return {'result': 'permission', 'reason': 'Read only user', 'route': 'sipalg'}
|
return {'result': 'permission', 'reason': 'Read only user', 'route': 'sipalg'}
|
||||||
enable = params.enable
|
enable = params.enable
|
||||||
DONT_LOAD=nf_conntrack_sip
|
|
||||||
|
|
||||||
initial_md5 = hashlib.md5(file_as_bytes(open('/etc/shorewall/shorewall.conf', 'rb'))).hexdigest()
|
initial_md5 = hashlib.md5(file_as_bytes(open('/etc/shorewall/shorewall.conf', 'rb'))).hexdigest()
|
||||||
fd, tmpfile = mkstemp()
|
fd, tmpfile = mkstemp()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue