Merge, fixes and bump
This commit is contained in:
commit
be941828f4
6
.flake8
Normal file
6
.flake8
Normal file
|
@ -0,0 +1,6 @@
|
|||
[flake8]
|
||||
ignore = E203,W504,W191,W503
|
||||
exclude = .git,__pycache__,orm/rbac.py
|
||||
max-complexity = 12
|
||||
max-line-length = 108
|
||||
indent-string = ' '
|
|
@ -1,3 +1,8 @@
|
|||
[0.7.1]
|
||||
[+] reactions CRUL
|
||||
[+] upload with storj
|
||||
|
||||
|
||||
[0.7.0]
|
||||
[+] inbox: context provider, chats
|
||||
[+] comments: show
|
||||
|
|
84
api/upload.py
Normal file
84
api/upload.py
Normal file
|
@ -0,0 +1,84 @@
|
|||
from flask import Flask, request, jsonify
|
||||
from werkzeug.utils import secure_filename
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError, WaiterError
|
||||
import tempfile
|
||||
import os
|
||||
|
||||
app = Flask(__name__)
|
||||
session = boto3.Session()
|
||||
storj_resource = session.resource('s3')
|
||||
storj_client = boto3.client('s3',
|
||||
aws_access_key_id=os.environ['STORJ_ACCESS_KEY'],
|
||||
aws_secret_access_key=os.environ['STORJ_SECRET_KEY'],
|
||||
endpoint_url=os.environ['STORJ_END_POINT']
|
||||
)
|
||||
|
||||
|
||||
def upload_storj(filecontent, filename, bucket_name):
|
||||
head = None
|
||||
bucket_obj = None
|
||||
try:
|
||||
bucket = storj_resource.Bucket(bucket_name)
|
||||
except ClientError:
|
||||
bucket = None
|
||||
|
||||
try:
|
||||
# In case filename already exists, get current etag to check if the
|
||||
# contents change after upload
|
||||
head = storj_client.head_object(Bucket=bucket_name, Key=filename)
|
||||
except ClientError:
|
||||
etag = ''
|
||||
else:
|
||||
etag = head['ETag'].strip('"')
|
||||
|
||||
try:
|
||||
bucket_obj = bucket.Object(filename)
|
||||
except (ClientError, AttributeError):
|
||||
bucket_obj = None
|
||||
|
||||
try:
|
||||
# Use the upload_fileobj method to safely upload the file
|
||||
storj_client.upload_fileobj(
|
||||
Fileobj=filecontent,
|
||||
Bucket=bucket_name,
|
||||
Key=filename
|
||||
)
|
||||
except (ClientError, AttributeError):
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
bucket_obj.wait_until_exists(IfNoneMatch=etag)
|
||||
except WaiterError:
|
||||
pass
|
||||
else:
|
||||
head = storj_client.head_object(Bucket=bucket_name, Key=filename)
|
||||
return head
|
||||
|
||||
|
||||
@app.route('/api/upload', methods=['post'])
|
||||
def upload():
|
||||
print(request.files)
|
||||
print(request.files.to_dict())
|
||||
# check if the post request has the file part
|
||||
if 'file' not in request.files:
|
||||
return {'error': 'No file part'}, 400
|
||||
file = request.files.get('file')
|
||||
if file:
|
||||
# save the file
|
||||
filename = secure_filename(file.name or file.filename)
|
||||
# if user does not select file, browser also
|
||||
# submit a empty part without filename
|
||||
if not filename:
|
||||
return {'error': 'No selected file'}, 400
|
||||
else:
|
||||
# Save the file to a temporary location
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
temp_path = os.path.join(temp_dir, filename)
|
||||
file.save(temp_path)
|
||||
# Open the file in binary mode
|
||||
with open(temp_path, 'rb') as filecontent:
|
||||
result = upload_storj(filecontent, filename, 'discoursio')
|
||||
else:
|
||||
return {'error': 'No selected file'}, 400
|
||||
return {'message': 'File uploaded', 'result': jsonify(result)}, 200
|
|
@ -1,85 +0,0 @@
|
|||
import { Writable } from 'stream'
|
||||
import formidable from 'formidable'
|
||||
import { S3Client } from '@aws-sdk/client-s3'
|
||||
import { Upload } from '@aws-sdk/lib-storage'
|
||||
|
||||
export const config = {
|
||||
api: {
|
||||
bodyParser: false
|
||||
}
|
||||
}
|
||||
|
||||
const BUCKET_NAME = process.env.S3_BUCKET || 'discours-io'
|
||||
const s3 = new S3Client({
|
||||
region: process.env.S3_REGION || 'eu-west-1',
|
||||
credentials: {
|
||||
accessKeyId: process.env.S3_ACCESS_KEY,
|
||||
secretAccessKey: process.env.S3_SECRET_KEY
|
||||
}
|
||||
})
|
||||
|
||||
const formidableConfig = {
|
||||
keepExtensions: true,
|
||||
maxFileSize: 10_000_000,
|
||||
maxFieldsSize: 10_000_000,
|
||||
maxFields: 7,
|
||||
allowEmptyFiles: false,
|
||||
multiples: false
|
||||
}
|
||||
|
||||
const formidablePromise = async (req, opts) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const form = formidable(opts)
|
||||
|
||||
form.parse(req, (err, fields, files) => {
|
||||
if (err) {
|
||||
return reject(err)
|
||||
}
|
||||
return resolve({ fields, files })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const fileConsumer = (acc) => {
|
||||
return new Writable({
|
||||
write: (chunk, _enc, next) => {
|
||||
acc.push(chunk)
|
||||
next()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async function handler(req, res) {
|
||||
if (req.method === 'POST') {
|
||||
try {
|
||||
const chunks = []
|
||||
const { fields, files }: any = await formidablePromise(req, {
|
||||
...formidableConfig,
|
||||
// consume this, otherwise formidable tries to save the file to disk
|
||||
fileWriteStreamHandler: () => fileConsumer(chunks)
|
||||
})
|
||||
|
||||
const data = Buffer.concat(chunks)
|
||||
|
||||
const params = {
|
||||
Bucket: process.env.S3_BUCKET || 'discours-io',
|
||||
Key: fields.name + '.' + fields.ext,
|
||||
Body: data,
|
||||
ACL: 'public-read',
|
||||
'Content-Type': fields.type
|
||||
}
|
||||
|
||||
const upload = new Upload({ params, client: s3 })
|
||||
await upload.done()
|
||||
// console.log(upload)
|
||||
const { singleUploadResult: result }: any = upload
|
||||
return res.status(200).json(result.Location)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
|
||||
return res.status(405).end()
|
||||
}
|
||||
|
||||
export default handler
|
115
package.json
115
package.json
|
@ -33,67 +33,61 @@
|
|||
"vercel-build": "astro build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.216.0",
|
||||
"@aws-sdk/lib-storage": "^3.223.0",
|
||||
"@solid-primitives/share": "^2.0.1",
|
||||
"astro-seo-meta": "^2.0.0",
|
||||
"formidable": "^2.1.1",
|
||||
"mailgun.js": "^8.0.2"
|
||||
"@connorskees/grass": "^0.12.0",
|
||||
"mailgun.js": "^8.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/solid-js": "^1.2.3",
|
||||
"@astrojs/vercel": "^2.3.3",
|
||||
"@babel/core": "^7.20.2",
|
||||
"@graphql-codegen/cli": "^2.13.12",
|
||||
"@graphql-codegen/typescript": "^2.8.2",
|
||||
"@graphql-codegen/typescript-operations": "^2.5.7",
|
||||
"@astrojs/solid-js": "^2.0.0",
|
||||
"@astrojs/vercel": "^3.0.0",
|
||||
"@babel/core": "^7.20.12",
|
||||
"@graphql-codegen/cli": "^2.16.4",
|
||||
"@graphql-codegen/typescript": "^2.8.7",
|
||||
"@graphql-codegen/typescript-operations": "^2.5.12",
|
||||
"@graphql-codegen/typescript-urql": "^3.7.3",
|
||||
"@graphql-codegen/urql-introspection": "^2.2.1",
|
||||
"@graphql-tools/url-loader": "^7.16.16",
|
||||
"@graphql-tools/url-loader": "^7.17.3",
|
||||
"@graphql-typed-document-node/core": "^3.1.1",
|
||||
"@nanostores/router": "^0.7.0",
|
||||
"@nanostores/solid": "^0.3.0",
|
||||
"@nanostores/router": "^0.8.0",
|
||||
"@nanostores/solid": "^0.3.2",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@solid-devtools/debugger": "^0.15.1",
|
||||
"@solid-devtools/logger": "^0.5.0",
|
||||
"@solid-primitives/memo": "^1.1.2",
|
||||
"@solid-primitives/storage": "^1.3.3",
|
||||
"@solid-primitives/memo": "^1.1.3",
|
||||
"@solid-primitives/storage": "^1.3.4",
|
||||
"@solid-primitives/upload": "^0.0.105",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/express": "^4.17.15",
|
||||
"@types/node": "^18.11.18",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
||||
"@typescript-eslint/parser": "^5.43.0",
|
||||
"@urql/core": "^3.0.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
||||
"@typescript-eslint/parser": "^5.48.2",
|
||||
"@urql/core": "^3.1.1",
|
||||
"@urql/devtools": "^2.0.3",
|
||||
"@urql/exchange-graphcache": "^5.0.5",
|
||||
"astro": "^1.6.8",
|
||||
"astro-eslint-parser": "^0.9.0",
|
||||
"@urql/exchange-graphcache": "^5.0.8",
|
||||
"astro": "^2.0.2",
|
||||
"astro-eslint-parser": "^0.11.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"bootstrap": "^5.2.2",
|
||||
"bootstrap": "^5.2.3",
|
||||
"clsx": "^1.2.1",
|
||||
"cookie": "^0.5.0",
|
||||
"cookie-signature": "^1.2.0",
|
||||
"cosmiconfig-toml-loader": "^1.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.27.0",
|
||||
"eslint-config-stylelint": "^17.0.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.2",
|
||||
"eslint-plugin-astro": "^0.21.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"eslint": "^8.32.0",
|
||||
"eslint-config-stylelint": "^17.1.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.3",
|
||||
"eslint-plugin-astro": "^0.23.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-jsx-a11y": "^6.7.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-solid": "^0.8.0",
|
||||
"eslint-plugin-sonarjs": "^0.16.0",
|
||||
"eslint-plugin-unicorn": "^45.0.0",
|
||||
"eslint-plugin-solid": "^0.9.4",
|
||||
"eslint-plugin-sonarjs": "^0.18.0",
|
||||
"eslint-plugin-unicorn": "^45.0.2",
|
||||
"graphql": "^16.6.0",
|
||||
"graphql-sse": "^1.3.1",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"graphql-ws": "^5.11.2",
|
||||
"hast-util-select": "^5.0.2",
|
||||
"husky": "^8.0.2",
|
||||
"hast-util-select": "^5.0.4",
|
||||
"husky": "^8.0.3",
|
||||
"idb": "^7.1.1",
|
||||
"jest": "^29.3.1",
|
||||
"lint-staged": "^13.0.3",
|
||||
"lint-staged": "^13.1.0",
|
||||
"loglevel": "^1.8.1",
|
||||
"loglevel-plugin-prefix": "^0.8.4",
|
||||
"markdown-it": "^13.0.1",
|
||||
|
@ -103,11 +97,11 @@
|
|||
"markdown-it-replace-link": "^1.1.0",
|
||||
"nanostores": "^0.7.1",
|
||||
"orderedmap": "^2.1.0",
|
||||
"postcss": "^8.4.19",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-modules": "5.0.0",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier": "^2.8.3",
|
||||
"prettier-eslint": "^15.0.1",
|
||||
"prosemirror-commands": "^1.3.1",
|
||||
"prosemirror-commands": "^1.5.0",
|
||||
"prosemirror-dropcursor": "^1.6.1",
|
||||
"prosemirror-example-setup": "^1.2.1",
|
||||
"prosemirror-gapcursor": "^1.3.1",
|
||||
|
@ -116,37 +110,36 @@
|
|||
"prosemirror-keymap": "^1.2.0",
|
||||
"prosemirror-markdown": "^1.10.1",
|
||||
"prosemirror-menu": "^1.2.1",
|
||||
"prosemirror-model": "^1.18.2",
|
||||
"prosemirror-model": "^1.19.0",
|
||||
"prosemirror-schema-list": "^1.2.2",
|
||||
"prosemirror-state": "^1.4.2",
|
||||
"prosemirror-view": "^1.29.1",
|
||||
"prosemirror-view": "^1.30.0",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-visualizer": "^5.8.3",
|
||||
"rollup-plugin-visualizer": "^5.9.0",
|
||||
"sass": "1.32.13",
|
||||
"solid-devtools": "^0.22.0",
|
||||
"solid-js": "^1.6.2",
|
||||
"solid-js-form": "^0.1.5",
|
||||
"solid-js": "^1.6.9",
|
||||
"solid-js-form": "^0.1.8",
|
||||
"solid-jsx": "^0.9.1",
|
||||
"solid-social": "^0.9.0",
|
||||
"solid-social": "^0.9.6",
|
||||
"solid-utils": "^0.8.1",
|
||||
"sort-package-json": "^2.1.0",
|
||||
"stylelint": "^14.15.0",
|
||||
"sort-package-json": "^2.3.0",
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-css-modules": "^4.1.0",
|
||||
"stylelint-config-prettier-scss": "^0.0.1",
|
||||
"stylelint-config-standard-scss": "^6.1.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"stylelint-order": "^6.0.1",
|
||||
"stylelint-scss": "^4.3.0",
|
||||
"swiper": "^8.4.4",
|
||||
"swiper": "^8.4.7",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.8.4",
|
||||
"undici": "^5.12.0",
|
||||
"typescript": "^4.9.4",
|
||||
"undici": "^5.15.1",
|
||||
"unique-names-generator": "^4.7.1",
|
||||
"uuid": "^9.0.0",
|
||||
"vite": "^3.2.4",
|
||||
"ws": "^8.11.0",
|
||||
"vite": "^3.2.5",
|
||||
"ws": "^8.12.0",
|
||||
"y-prosemirror": "^1.2.0",
|
||||
"y-protocols": "^1.0.5",
|
||||
"y-webrtc": "^10.2.3",
|
||||
"yjs": "^13.5.42"
|
||||
"y-webrtc": "^10.2.4",
|
||||
"yjs": "^13.5.44"
|
||||
}
|
||||
}
|
||||
|
|
4931
pnpm-lock.yaml
4931
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
2
requirements.txt
Normal file
2
requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Flask==2.2.2
|
||||
boto3
|
|
@ -24,7 +24,7 @@ type Props = {
|
|||
isArticleAuthor?: boolean
|
||||
}
|
||||
|
||||
const Comment = (props: Props) => {
|
||||
export const Comment = (props: Props) => {
|
||||
const [isReplyVisible, setIsReplyVisible] = createSignal(false)
|
||||
const [loading, setLoading] = createSignal<boolean>(false)
|
||||
const [submitted, setSubmitted] = createSignal<boolean>(false)
|
||||
|
|
|
@ -7,14 +7,14 @@ import { For, createSignal, Show, onMount } from 'solid-js'
|
|||
import { clsx } from 'clsx'
|
||||
import styles from './Settings.module.scss'
|
||||
import { useProfileForm } from '../../../context/profile'
|
||||
import { createFileUploader } from '@solid-primitives/upload'
|
||||
import validateUrl from '../../../utils/validateUrl'
|
||||
|
||||
export const ProfileSettingsPage = (props: PageProps) => {
|
||||
const [addLinkForm, setAddLinkForm] = createSignal<boolean>(false)
|
||||
const [incorrectUrl, setIncorrectUrl] = createSignal<boolean>(false)
|
||||
const { form, updateFormField, submit, slugError } = useProfileForm()
|
||||
const handleChangeSocial = (value) => {
|
||||
let updateForm: HTMLFormElement
|
||||
const handleChangeSocial = (value: string) => {
|
||||
if (validateUrl(value)) {
|
||||
updateFormField('links', value)
|
||||
setAddLinkForm(false)
|
||||
|
@ -26,28 +26,32 @@ export const ProfileSettingsPage = (props: PageProps) => {
|
|||
event.preventDefault()
|
||||
submit(form)
|
||||
}
|
||||
|
||||
const { files, selectFiles: selectFilesAsync } = createFileUploader({ accept: 'image/*' })
|
||||
|
||||
const handleUpload = () => {
|
||||
selectFilesAsync(async ([{ source, name, size, file }]) => {
|
||||
const image = { source, name, size, file }
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append('type', file.type)
|
||||
formData.append('name', image.source.split('/').pop())
|
||||
formData.append('ext', image.name.split('.').pop())
|
||||
const resp = await fetch('/api/upload', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
const url = await resp.json()
|
||||
updateFormField('userpic', url)
|
||||
} catch (error) {
|
||||
console.error('[upload] error', error)
|
||||
let userpicFile: HTMLInputElement
|
||||
const handleFileUpload = async (file: File) => {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
console.log(formData)
|
||||
const response = await fetch('/api/upload', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
const json = await response.json()
|
||||
console.debug(json)
|
||||
}
|
||||
const handleUserpicUpload = async (ev) => {
|
||||
// TODO: show progress
|
||||
console.debug('handleUserpicUpload')
|
||||
try {
|
||||
const f = ev.target.files[0]
|
||||
if (f) await handleFileUpload(f)
|
||||
} catch (error) {
|
||||
console.error('[upload] error', error)
|
||||
}
|
||||
}
|
||||
|
||||
const [hostname, setHostname] = createSignal('new.discours.io')
|
||||
onMount(() => setHostname(window?.location.host))
|
||||
|
||||
|
@ -65,12 +69,24 @@ export const ProfileSettingsPage = (props: PageProps) => {
|
|||
<div class="col-md-10 col-lg-9 col-xl-8">
|
||||
<h1>{t('Profile settings')}</h1>
|
||||
<p class="description">{t('Here you can customize your profile the way you want.')}</p>
|
||||
<form onSubmit={handleSubmit}>
|
||||
<form ref={updateForm} onSubmit={handleSubmit} enctype="multipart/form-data">
|
||||
<h4>{t('Userpic')}</h4>
|
||||
<div class="pretty-form__item">
|
||||
<div class={styles.avatarContainer}>
|
||||
<img class={styles.avatar} src={form.userpic} alt={form.name} />
|
||||
<input type="button" class={styles.avatarInput} onClick={handleUpload} />
|
||||
<img
|
||||
class={styles.avatar}
|
||||
src={form.userpic}
|
||||
alt={form.name}
|
||||
onClick={() => userpicFile.click()}
|
||||
/>
|
||||
<input
|
||||
ref={userpicFile}
|
||||
type="file"
|
||||
name="file"
|
||||
value="file"
|
||||
hidden
|
||||
onChange={handleUserpicUpload}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<h4>{t('Name')}</h4>
|
||||
|
|
|
@ -20,7 +20,7 @@ import { Popup } from '../_shared/Popup'
|
|||
import { AuthorCard } from '../Author/Card'
|
||||
import { loadReactionsBy, REACTIONS_AMOUNT_PER_PAGE } from '../../stores/zine/reactions'
|
||||
import { apiClient } from '../../utils/apiClient'
|
||||
import Comment from '../Article/Comment'
|
||||
import { Comment } from '../Article/Comment'
|
||||
|
||||
// TODO: load reactions on client
|
||||
type AuthorProps = {
|
||||
|
@ -127,7 +127,7 @@ export const AuthorView = (props: AuthorProps) => {
|
|||
Популярное
|
||||
</button>
|
||||
</li>
|
||||
*/}
|
||||
*/}
|
||||
<li classList={{ selected: searchParams().by === 'about' }}>
|
||||
<button type="button" onClick={() => changeSearchParam('by', 'about')}>
|
||||
О себе
|
||||
|
|
|
@ -7,7 +7,7 @@ import { ArticleCard } from '../Feed/Card'
|
|||
import { AuthorCard } from '../Author/Card'
|
||||
import { t } from '../../utils/intl'
|
||||
import { FeedSidebar } from '../Feed/Sidebar'
|
||||
import Comment from '../Article/Comment'
|
||||
import { Comment as CommentCard } from '../Article/Comment'
|
||||
import { loadShouts, useArticlesStore } from '../../stores/zine/articles'
|
||||
import { useReactionsStore } from '../../stores/zine/reactions'
|
||||
import { useAuthorsStore } from '../../stores/zine/authors'
|
||||
|
@ -133,26 +133,10 @@ export const FeedView = () => {
|
|||
<aside class={clsx('col-md-3', styles.feedAside)}>
|
||||
<section class={styles.asideSection}>
|
||||
<h4>{t('Comments')}</h4>
|
||||
<ul class={stylesArticle.comments}>
|
||||
<For each={topComments().filter((item) => item.body)}>
|
||||
{(comment) => {
|
||||
return (
|
||||
<li class={styles.comment}>
|
||||
<div class={clsx('text-truncate', styles.commentBody)} innerHTML={comment.body} />
|
||||
<AuthorCard
|
||||
author={comment.createdBy as Author}
|
||||
isFeedMode={true}
|
||||
compact={true}
|
||||
hideFollow={true}
|
||||
/>
|
||||
<div class={clsx('text-truncate', styles.commentArticleTitle)}>
|
||||
<a href={`/${comment.shout.slug}`}>{comment.shout.title}</a>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
}}
|
||||
</For>
|
||||
</ul>
|
||||
<For each={topComments()}>
|
||||
{/*FIXME: different components/better comment props*/}
|
||||
{(comment) => <CommentCard comment={comment} reactions={[]} compact={true} />}
|
||||
</For>
|
||||
</section>
|
||||
|
||||
<Show when={topTopics().length > 0}>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { createContext, createEffect, createSignal, useContext } from 'solid-js'
|
||||
import type { Accessor, JSX } from 'solid-js'
|
||||
import { createContext, createSignal, useContext } from 'solid-js'
|
||||
// import { createChatClient } from '../graphql/privateGraphQLClient'
|
||||
import type { Chat, Message, MutationCreateMessageArgs } from '../graphql/types.gen'
|
||||
import { apiClient } from '../utils/apiClient'
|
||||
|
|
15
vercel.json
15
vercel.json
|
@ -1,12 +1,9 @@
|
|||
{
|
||||
"functions": {
|
||||
"api/upload.ts": {
|
||||
"memory": 3008,
|
||||
"maxDuration": 30
|
||||
},
|
||||
"api/feedback.js": {
|
||||
"memory": 3008,
|
||||
"maxDuration": 30
|
||||
"routes": [
|
||||
{
|
||||
"src": "/api/upload",
|
||||
"headers": { "Content-Type": "application/json" },
|
||||
"dest": "api/upload.py"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user