mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
794 B
26 lines
794 B
7 months ago
|
# coding:utf-8
|
||
|
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
# MW-Linux面板
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
# Author: midoks <midoks@163.com>
|
||
|
# ---------------------------------------------------------------------------------
|
||
|
|
||
|
|
||
|
import json
|
||
|
|
||
|
from admin.model import db, Logs
|
||
|
import core.mw as mw
|
||
|
|
||
|
def add(type, log, uid=1) -> str:
|
||
|
add_time = mw.formatDate()
|
||
|
add_logs = Logs(
|
||
|
uid=uid,
|
||
|
log=log,
|
||
|
type=type,
|
||
|
add_time=add_time)
|
||
|
db.session.add(add_logs)
|
||
|
db.session.commit()
|
||
|
return True
|