This commit is contained in:
Nolan Lawson 2018-02-08 08:22:14 -08:00
parent 016ecfca8d
commit d93811d470
20 changed files with 18 additions and 18 deletions

View File

@ -1,6 +1,6 @@
import { store } from '../_store/store'
import { database } from '../_utils/database/database'
import { getTimeline } from '../_utils/mastodon/timelines'
import { database } from '../_database/database'
import { getTimeline } from '../_api/timelines'
import { toast } from '../_utils/toast'
import { mark, stop } from '../_utils/marks'
import { mergeArrays } from '../_utils/arrays'

View File

@ -1,4 +1,4 @@
import { paramsString } from '../ajax'
import { paramsString } from '../_utils/ajax'
import noop from 'lodash/noop'
import WebSocketClient from '@gamestdio/websocket'

View File

@ -1,4 +1,4 @@
import { get } from '../ajax'
import { get } from '../_utils/ajax'
import { basename } from './utils'
export function getInstanceInfo(instanceName) {

View File

@ -1,7 +1,7 @@
const WEBSITE = 'https://pinafore.social'
const SCOPES = 'read write follow'
const CLIENT_NAME = 'Pinafore'
import { post, get, paramsString } from '../ajax'
import { post, get, paramsString } from '../_utils/ajax'
import { basename } from './utils'
export function registerApplication(instanceName, redirectUri) {

View File

@ -1,4 +1,4 @@
import { get, paramsString } from '../ajax'
import { get, paramsString } from '../_utils/ajax'
export function search(instanceName, accessToken, query) {
let url = `https://${instanceName}/api/v1/search?` + paramsString({

View File

@ -1,4 +1,4 @@
import { get, paramsString } from '../ajax'
import { get, paramsString } from '../_utils/ajax'
import { basename } from './utils'
function getTimelineUrlPath(timeline) {

View File

@ -1,4 +1,4 @@
import { get, paramsString } from '../ajax'
import { get, paramsString } from '../_utils/ajax'
import { basename } from './utils'
export function getVerifyCredentials(instanceName, accessToken) {

View File

@ -59,7 +59,7 @@
import { store } from '../../_store/store'
import LoadingPage from '../LoadingPage.html'
import { toast } from '../../_utils/toast'
import { search } from '../../_utils/mastodon/search'
import { search } from '../../_api/search'
import SearchResults from './SearchResults.html'
export default {

View File

@ -52,7 +52,7 @@
import LoadingFooter from './LoadingFooter.html'
import VirtualList from '../virtualList/VirtualList.html'
import { timelines } from '../../_static/timelines'
import { database } from '../../_utils/database/database'
import { database } from '../../_database/database'
import { initializeTimeline, fetchTimelineItemsOnScrollToBottom, setupTimeline } from '../../_actions/timeline'
import LoadingPage from '../LoadingPage.html'

View File

@ -1,5 +1,5 @@
import { getAccount, getRelationship } from '../../_utils/mastodon/user'
import { database } from '../../_utils/database/database'
import { getAccount, getRelationship } from '../../_api/user'
import { database } from '../../_database/database'
import { store } from '../../_store/store'
async function updateAccount(accountId, instanceName, accessToken) {

View File

@ -1,8 +1,8 @@
import { getVerifyCredentials } from '../../../_utils/mastodon/user'
import { getVerifyCredentials } from '../../../_api/user'
import { store } from '../../../_store/store'
import { switchToTheme } from '../../../_utils/themeEngine'
import { toast } from '../../../_utils/toast'
import { database } from '../../../_utils/database/database'
import { database } from '../../../_database/database'
import { goto } from 'sapper/runtime.js'
import pAny from 'p-any'

View File

@ -1,8 +1,8 @@
import { getAccessTokenFromAuthCode, registerApplication, generateAuthLink } from '../../../_utils/mastodon/oauth'
import { getInstanceInfo } from '../../../_utils/mastodon/instance'
import { getAccessTokenFromAuthCode, registerApplication, generateAuthLink } from '../../../_api/oauth'
import { getInstanceInfo } from '../../../_api/instance'
import { goto } from 'sapper/runtime.js'
import { switchToTheme } from '../../../_utils/themeEngine'
import { database } from '../../../_utils/database/database'
import { database } from '../../../_database/database'
import { store } from '../../../_store/store'
import { updateVerifyCredentialsForInstance } from './[instanceName]'

View File

@ -6,7 +6,7 @@ const static = require('serve-static');
const { PORT = 4002 } = process.env;
// this allows us to do e.g. `fetch('/api/blog')` on the server
// this allows us to do e.g. `fetch('/_api/blog')` on the server
const fetch = require('node-fetch');
global.fetch = (url, opts) => {
if (url[0] === '/') url = `http://localhost:${PORT}${url}`;