This commit is contained in:
syuilo
2017-02-20 16:09:46 +09:00
parent 4c43573c1e
commit c05abf4da7
80 changed files with 400 additions and 366 deletions

View File

@ -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');

View File

@ -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!