mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 02:14:32 +08:00
使用sqlite替换nedb
This commit is contained in:
@@ -20,7 +20,7 @@ const AppModal = ({
|
||||
const method = app ? 'put' : 'post';
|
||||
const payload = { ...values };
|
||||
if (app) {
|
||||
payload._id = app._id;
|
||||
payload.id = app.id;
|
||||
}
|
||||
const { code, data } = await request[method](`${config.apiPrefix}apps`, {
|
||||
data: payload,
|
||||
|
||||
@@ -164,7 +164,7 @@ const Setting = ({
|
||||
),
|
||||
onOk() {
|
||||
request
|
||||
.delete(`${config.apiPrefix}apps`, { data: [record._id] })
|
||||
.delete(`${config.apiPrefix}apps`, { data: [record.id] })
|
||||
.then((data: any) => {
|
||||
if (data.code === 200) {
|
||||
message.success('删除成功');
|
||||
@@ -198,7 +198,7 @@ const Setting = ({
|
||||
),
|
||||
onOk() {
|
||||
request
|
||||
.put(`${config.apiPrefix}apps/${record._id}/reset-secret`)
|
||||
.put(`${config.apiPrefix}apps/${record.id}/reset-secret`)
|
||||
.then((data: any) => {
|
||||
if (data.code === 200) {
|
||||
message.success('重置成功');
|
||||
@@ -222,7 +222,7 @@ const Setting = ({
|
||||
};
|
||||
|
||||
const handleApp = (app: any) => {
|
||||
const index = dataSource.findIndex((x) => x._id === app._id);
|
||||
const index = dataSource.findIndex((x) => x.id === app.id);
|
||||
const result = [...dataSource];
|
||||
if (index === -1) {
|
||||
result.push(app);
|
||||
@@ -339,7 +339,7 @@ const Setting = ({
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
dataSource={dataSource}
|
||||
rowKey="_id"
|
||||
rowKey="id"
|
||||
size="middle"
|
||||
scroll={{ x: 768 }}
|
||||
loading={loading}
|
||||
|
||||
@@ -73,7 +73,7 @@ const LoginLog = ({ data }: any) => {
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
dataSource={data}
|
||||
rowKey="_id"
|
||||
rowKey="id"
|
||||
size="middle"
|
||||
scroll={{ x: 768 }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user