Skip to content

Commit

Permalink
feat(functions/slack): add GCF v2 decorators (#7889)
Browse files Browse the repository at this point in the history
* feat(functions/slack): add GCF v2 decorators

* Fix lint

* Fix copyright

* Bots hate commas

* Humans hate commas too

* Fix copyright

Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>

Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>
  • Loading branch information
Ace Nassri and dandhlee committed May 13, 2022
1 parent cc69155 commit d10a7d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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
Expand All @@ -15,6 +15,7 @@
import os

from flask import jsonify
import functions_framework
import googleapiclient.discovery
from slack.signature import SignatureVerifier

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 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

0 comments on commit d10a7d4

Please sign in to comment.