fix: save request context set on teams

This commit is contained in:
Andrew Bastin
2021-08-20 18:25:34 +05:30
parent 7082eb27db
commit b08b06c4d4
4 changed files with 33 additions and 21 deletions

View File

@@ -232,7 +232,7 @@ import {
import { defineActionHandler } from "~/helpers/actions"
import { copyToClipboard } from "~/helpers/utils/clipboard"
import { useSetting } from "~/newstore/settings"
import { saveRequestAsTeams } from "~/helpers/teams/utils"
import { overwriteRequestTeams } from "~/helpers/teams/utils"
import { apolloClient } from "~/helpers/apollo"
const methods = [
@@ -386,9 +386,9 @@ export default defineComponent({
} else if (saveCtx.originLocation === "team-collection") {
const req = getRESTRequest()
// TODO: handle error case (NOTE: saveRequestAsTeams is async)
// TODO: handle error case (NOTE: overwriteRequestTeams is async)
try {
saveRequestAsTeams(
overwriteRequestTeams(
apolloClient,
JSON.stringify(req),
req.name,