mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Linting fixes
This commit is contained in:
parent
cb98a9cf86
commit
93b095818d
3 changed files with 12 additions and 16 deletions
|
|
@ -83,15 +83,19 @@ export const uploadFileRequestResolver: ResolverFn<
|
|||
)
|
||||
|
||||
if (input.createPageEntry) {
|
||||
let page = await getPageByParam({
|
||||
const page = await getPageByParam({
|
||||
userId: claims.uid,
|
||||
url: input.url,
|
||||
})
|
||||
if (page) {
|
||||
await updatePage(page.id, {
|
||||
savedAt: new Date(),
|
||||
archivedAt: null,
|
||||
}, ctx)
|
||||
await updatePage(
|
||||
page.id,
|
||||
{
|
||||
savedAt: new Date(),
|
||||
archivedAt: null,
|
||||
},
|
||||
ctx
|
||||
)
|
||||
} else {
|
||||
const pageId = await createPage(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,17 +2,9 @@ import Knex from 'knex'
|
|||
import { PubsubClient } from '../datalayer/pubsub'
|
||||
import { UserData } from '../datalayer/user/model'
|
||||
import { homePageURL } from '../env'
|
||||
import {
|
||||
PageType,
|
||||
SaveErrorCode,
|
||||
SaveFileInput,
|
||||
SaveResult,
|
||||
} from '../generated/graphql'
|
||||
import { SaveErrorCode, SaveFileInput, SaveResult } from '../generated/graphql'
|
||||
import { DataModels } from '../resolvers/types'
|
||||
import { generateSlug } from '../utils/helpers'
|
||||
import { getStorageFileDetails, makeStorageFilePublic } from '../utils/uploads'
|
||||
import { createPage, getPageByParam, updatePage } from '../elastic/pages'
|
||||
import { ArticleSavingRequestStatus } from '../elastic/types'
|
||||
import { getStorageFileDetails } from '../utils/uploads'
|
||||
|
||||
type SaveContext = {
|
||||
pubsub: PubsubClient
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ export const validatedDate = (
|
|||
|
||||
export const titleForFilePath = (url: string): string => {
|
||||
try {
|
||||
const title = decodeURI(path.basename(new URL(url).pathname, '.pdf'))
|
||||
const title = decodeURI(path.basename(new URL(url).pathname, '.pdf'))
|
||||
return title
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue