mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-12-02 11:47:57 +08:00
feat: delete suffix .json while import & create
This commit is contained in:
parent
2f5a103866
commit
249e5d7c97
@ -161,7 +161,7 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy {
|
||||
];
|
||||
}
|
||||
async createGroup({ name, projectID, content }) {
|
||||
const groupID = await this.storageInstance.group.add({ name, projectID });
|
||||
const groupID = await this.storageInstance.group.add({ name: name.replace(/\.json$/, ''), projectID });
|
||||
const result = content.apiData.map((it, index) => ({ ...it, groupID, uuid: Date.now() + index }));
|
||||
await this.storageInstance.apiData.bulkAdd(result);
|
||||
this.buildGroupTreeData();
|
||||
|
Loading…
Reference in New Issue
Block a user