diff --git a/functions/slack/main.py b/functions/slack/main.py index 47f3ef037aff..31f50ea9ee79 100644 --- a/functions/slack/main.py +++ b/functions/slack/main.py @@ -1,4 +1,4 @@ -# Copyright 2018, Google, LLC. +# Copyright 2018 Google LLC. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -15,6 +15,7 @@ import os from flask import jsonify +import functions_framework import googleapiclient.discovery from slack.signature import SignatureVerifier @@ -89,6 +90,7 @@ def make_search_request(query): # [START functions_slack_search] +@functions_framework.http def kg_search(request): if request.method != 'POST': return 'Only POST requests are accepted', 405 diff --git a/functions/slack/requirements.txt b/functions/slack/requirements.txt index 94ee178e30fa..08c9316f9288 100644 --- a/functions/slack/requirements.txt +++ b/functions/slack/requirements.txt @@ -1,3 +1,4 @@ google-api-python-client==2.41.0 flask==2.1.0 +functions-framework==3.0.0 slackclient==2.9.4