MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / SetPanelInfo

Method SetPanelInfo

class/config.py:1571–1581  ·  view source on GitHub ↗
(self, get)

Source from the content-addressed store, hash-verified

1569
1570 # 修改面板资料
1571 def SetPanelInfo(self, get):
1572 # 校验是还是重复
1573 isSave = public.M('panel').where('(title=? OR url=?) AND id!=?', (get.title, get.url, get.id)).count()
1574 if isSave: return public.returnMsg(False, 'PANEL_SSL_ADD_EXISTS')
1575 import time, json
1576
1577 # 更新到数据库
1578 isRe = public.M('panel').where('id=?', (get.id,)).save('title,url,username,password',
1579 (get.title, get.url, get.username, get.password))
1580 if isRe: return public.returnMsg(True, 'EDIT_SUCCESS')
1581 return public.returnMsg(False, 'EDIT_ERROR')
1582
1583 # 删除面板资料
1584 def DelPanelInfo(self, get):

Callers

nothing calls this directly

Calls 5

returnMsgMethod · 0.80
countMethod · 0.45
whereMethod · 0.45
MMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected