Skip to content

Commit 05602a3

Browse files
kakao-joo-yoonjoostory
authored andcommitted
사용하지 않는 코드 정리
1 parent 0594522 commit 05602a3

File tree

5 files changed

+0
-42
lines changed

5 files changed

+0
-42
lines changed

src/main/apis/tistory-api.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const fs = require('fs')
33
const fetch = require('isomorphic-fetch')
44
const querystring = require('querystring')
55
const FormData = require('form-data')
6-
const {session} = require('electron')
76
const stream = require('stream')
87
const OauthInfoReader = require('../oauth/OauthInfoReader')
98
const appInfo = require('../appInfo')

src/main/apis/tumblr-api.js

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const uuid = require('uuid').v4
22
const OauthInfoReader = require('../oauth/OauthInfoReader')
3-
const oauth = require("../oauth/ElectronOauth1")
4-
const {session, BrowserWindow} = require('electron')
53
const tumblr = require("tumblr.js")
64
const ExternalOAuth1 = require('../oauth/ExternalOAuth1');
75
const OAuthRequestManager = require('../oauth/OAuthRequestManager');
@@ -33,41 +31,6 @@ const requestAuth = (successHandler, failureHandler) => {
3331

3432
}
3533

36-
const getAccessToken = () => {
37-
const window = new BrowserWindow({
38-
width: 800,
39-
height: 600,
40-
alwaysOnTop: true,
41-
autoHideMenuBar: true,
42-
webPreferences: {
43-
nodeIntegration: false,
44-
contextIsolation: true,
45-
session: session.fromPartition("editor:oauth1:" + new Date())
46-
}
47-
})
48-
49-
const oauthReader = new OauthInfoReader()
50-
const tumblrInfo = oauthReader.getTumblr()
51-
const config = {
52-
key: tumblrInfo.clientKey,
53-
secret: tumblrInfo.clientSecret,
54-
requestUrl: tumblrInfo.requestTokenUrl,
55-
authenticateUrl: tumblrInfo.authorizeUrl,
56-
accessUrl: tumblrInfo.tokenUrl,
57-
authCallback: tumblrInfo.redirectUri,
58-
version: '1.0a',
59-
signatureMethod: 'HMAC-SHA1'
60-
}
61-
62-
return oauth(config, window)
63-
.catch(error => {
64-
console.log("error", error)
65-
})
66-
.finally(() => {
67-
window.close()
68-
})
69-
}
70-
7134
function createTumblrClient(auth) {
7235
const oauthReader = new OauthInfoReader()
7336
const tumblrInfo = oauthReader.getTumblr()
@@ -189,7 +152,6 @@ const fetchAccount = async (auth) => {
189152

190153
module.exports = {
191154
requestAuth: requestAuth,
192-
getAccessToken: getAccessToken,
193155
fetchUser: fetchUser,
194156
fetchPosts: fetchPosts,
195157
fetchPost: fetchPost,

src/main/events/auth.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const uuid = require('uuid').v4
22
const { ipcMain } = require('electron')
33
const AuthenticationManager = require('../lib/AuthenticationManager')
44
const ProviderApiManager = require('../lib/ProviderApiManager')
5-
const OAuthRequestManager = require('../oauth/OAuthRequestManager');
65

76
async function fetchAccount(auth) {
87
const api = ProviderApiManager.getApi(auth.provider)

src/main/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const ipc = require('./ipc-event')
33
const settings = require('electron-settings')
44
const { initWindow } = require('./window')
55
const OAuthRequestManager = require('./oauth/OAuthRequestManager')
6-
const ProviderApiManager = require('./lib/ProviderApiManager')
76

87
const PROTOCOL = "tistory-editor"
98

src/main/oauth/ExternalOAuth2.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const Promise = require('pinkie-promise');
21
const queryString = require('querystring');
32
const fetch = require('node-fetch');
43
const electron = require('electron');

0 commit comments

Comments
 (0)