use installed triggers
cannot call external services from default triggers
This commit is contained in:
@ -2,6 +2,7 @@ import { getShopifyProducts, runShopifyOrders } from "./shopifyApi"
|
||||
import { fillProductFromTemplate } from "./fillProductFromTemplate"
|
||||
import { createMissingPhotoFolders } from "./createMissingPhotoFolders"
|
||||
import { matchProductToShopify } from "./match"
|
||||
import { reinstallTriggers } from "./triggers"
|
||||
|
||||
export function initMenu() {
|
||||
let ui = SpreadsheetApp.getUi()
|
||||
@ -20,6 +21,13 @@ export function initMenu() {
|
||||
.addItem("Run Shopify Orders", runShopifyOrders.name)
|
||||
.addItem("Get Shopify Products", getShopifyProducts.name)
|
||||
)
|
||||
.addSeparator()
|
||||
.addSubMenu(
|
||||
ui
|
||||
.createMenu("Utilities...")
|
||||
.addItem("Reauthorize script", reauthorizeScript.name)
|
||||
.addItem("Reinstall triggers", reinstallTriggers.name)
|
||||
)
|
||||
.addToUi()
|
||||
}
|
||||
|
||||
@ -32,3 +40,7 @@ export function matchProductToShopifyHandler() {
|
||||
let row = SpreadsheetApp.getCurrentCell().getRow()
|
||||
matchProductToShopify(row)
|
||||
}
|
||||
|
||||
export function reauthorizeScript() {
|
||||
ScriptApp.invalidateAuth()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user