Skip to content

Commit

Permalink
Merge pull request GoogleCloudDataproc#179 from Shubha-accenture/logi…
Browse files Browse the repository at this point in the history
…n-handler-post-request-changes

changing login get request to post
  • Loading branch information
Shubha-accenture authored Aug 2, 2024
2 parents 1e9f4a4 + 1225221 commit 6fa175d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dataproc_jupyter_plugin/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async def get(self):

class LoginHandler(APIHandler):
@tornado.web.authenticated
async def get(self):
async def post(self):
cmd = "gcloud auth login"
process = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True
Expand Down
4 changes: 3 additions & 1 deletion src/login/authLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ const AuthLoginComponent = ({

const login = async () => {
setIsloginDisabled(true);
const data = await requestAPI('login');
const data = await requestAPI('login', {
method: 'POST'
});;
if (typeof data === 'object' && data !== null) {
const loginStatus = (data as { login: string }).login;
if (loginStatus === STATUS_SUCCESS) {
Expand Down

0 comments on commit 6fa175d

Please sign in to comment.