bugfix
This commit is contained in:
parent
11cd2e150d
commit
b91704a695
27
wwwroot/codes/delete_code.dspy
Normal file
27
wwwroot/codes/delete_code.dspy
Normal file
@ -0,0 +1,27 @@
|
||||
print(params_kw, 'delete_code.dspy')
|
||||
ns = {
|
||||
'id':params_kw['id'],
|
||||
'del_flg':'1'
|
||||
}
|
||||
dbname = get_definition('codesdb')
|
||||
db = DBPools()
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
r = await sor.U('appcodes', ns)
|
||||
print('delete success');
|
||||
return {
|
||||
"widgettype":"Message",
|
||||
"options":{
|
||||
"title":"Delete Success",
|
||||
"message":"ok"
|
||||
}
|
||||
}
|
||||
|
||||
print('Delete failed');
|
||||
return {
|
||||
"widgettype":"Error",
|
||||
"options":{
|
||||
"title":"Delete Error",
|
||||
"message":"failed"
|
||||
}
|
||||
}
|
||||
|
28
wwwroot/codes/delete_kv.dspy
Normal file
28
wwwroot/codes/delete_kv.dspy
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
print(params_kw, 'delete_code.dspy')
|
||||
ns = {
|
||||
'id':params_kw['id'],
|
||||
'del_flg':'1'
|
||||
}
|
||||
dbname = get_definition('codesdb')
|
||||
db = DBPools()
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
r = await sor.U('appcodes_kv', ns)
|
||||
print('delete success');
|
||||
return {
|
||||
"widgettype":"Message",
|
||||
"options":{
|
||||
"title":"Delete Success",
|
||||
"message":"ok"
|
||||
}
|
||||
}
|
||||
|
||||
print('Delete failed');
|
||||
return {
|
||||
"widgettype":"Error",
|
||||
"options":{
|
||||
"title":"Delete Error",
|
||||
"message":"failed"
|
||||
}
|
||||
}
|
||||
|
24
wwwroot/codes/update_code.dspy
Normal file
24
wwwroot/codes/update_code.dspy
Normal file
@ -0,0 +1,24 @@
|
||||
print(params_kw, 'update_kv.dspy')
|
||||
ns = params_kw.copy()
|
||||
dbname = get_definition('codesdb')
|
||||
db = DBPools()
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
r = await sor.U('appcodes_kv', ns)
|
||||
print('update success');
|
||||
return {
|
||||
"widgettype":"Message",
|
||||
"options":{
|
||||
"title":"Update Success",
|
||||
"message":"ok"
|
||||
}
|
||||
}
|
||||
|
||||
print('update failed');
|
||||
return {
|
||||
"widgettype":"Error",
|
||||
"options":{
|
||||
"title":"Update Error",
|
||||
"message":"failed"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user