wip
This commit is contained in:
@ -112,13 +112,13 @@
|
||||
this.app = @session.app
|
||||
|
||||
this.cancel = () => {
|
||||
this.api 'auth/deny' do
|
||||
this.api('auth/deny', {
|
||||
token: @session.token
|
||||
.then =>
|
||||
this.trigger('denied');
|
||||
|
||||
this.accept = () => {
|
||||
this.api 'auth/accept' do
|
||||
this.api('auth/accept', {
|
||||
token: @session.token
|
||||
.then =>
|
||||
this.trigger('accepted');
|
||||
|
@ -100,15 +100,15 @@
|
||||
if not this.SIGNIN then return
|
||||
|
||||
// Fetch session
|
||||
this.api 'auth/session/show' do
|
||||
this.api('auth/session/show', {
|
||||
token: @token
|
||||
.then (session) =>
|
||||
}).then((session) => {
|
||||
this.session = session
|
||||
this.fetching = false
|
||||
|
||||
// 既に連携していた場合
|
||||
if @session.app.is_authorized
|
||||
this.api 'auth/accept' do
|
||||
this.api('auth/accept', {
|
||||
token: @session.token
|
||||
.then =>
|
||||
@accepted!
|
||||
|
Reference in New Issue
Block a user