mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-22 16:26:28 +00:00
bug
This commit is contained in:
parent
5944c784ba
commit
f153102978
@ -1 +1,2 @@
|
|||||||
target
|
target
|
||||||
|
node_modules
|
@ -23,4 +23,6 @@ COPY --from=CLIENT /tmp/build ./client/build
|
|||||||
|
|
||||||
ENV MEMCACHE=memcached:11211
|
ENV MEMCACHE=memcached:11211
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
ENTRYPOINT [ "/app/cryptgeon" ]
|
ENTRYPOINT [ "/app/cryptgeon" ]
|
@ -13,7 +13,7 @@ type CallOptions = {
|
|||||||
method: string
|
method: string
|
||||||
body?: any
|
body?: any
|
||||||
}
|
}
|
||||||
const base = dev ? 'http://localhost:5000' : undefined
|
const base = dev ? 'http://localhost:5000/api/' : '/api/'
|
||||||
async function call(options: CallOptions) {
|
async function call(options: CallOptions) {
|
||||||
return fetch(base + options.url, {
|
return fetch(base + options.url, {
|
||||||
method: options.method,
|
method: options.method,
|
||||||
@ -27,7 +27,7 @@ async function call(options: CallOptions) {
|
|||||||
|
|
||||||
export async function create(note: Note) {
|
export async function create(note: Note) {
|
||||||
const data = await call({
|
const data = await call({
|
||||||
url: '/api/notes',
|
url: 'notes',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
body: note,
|
body: note,
|
||||||
})
|
})
|
||||||
@ -36,7 +36,7 @@ export async function create(note: Note) {
|
|||||||
|
|
||||||
export async function get(id: string) {
|
export async function get(id: string) {
|
||||||
const data = await call({
|
const data = await call({
|
||||||
url: `/api/notes/${id}`,
|
url: `notes/${id}`,
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
})
|
})
|
||||||
return data as NotePublic
|
return data as NotePublic
|
||||||
@ -44,7 +44,7 @@ export async function get(id: string) {
|
|||||||
|
|
||||||
export async function info(id: string) {
|
export async function info(id: string) {
|
||||||
const data = await call({
|
const data = await call({
|
||||||
url: `/api/notes/${id}`,
|
url: `notes/${id}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
return data as NoteInfo
|
return data as NoteInfo
|
||||||
|
Loading…
Reference in New Issue
Block a user