Skip to content

Commit

Permalink
feat: delete suffix .json while import & create
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Jun 17, 2022
1 parent 2f5a103 commit 249e5d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 249e5d7

Please sign in to comment.