1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-04 23:10:13 +01:00

fixed urls for deploying

This commit is contained in:
Elias Schneider 2022-04-25 17:11:41 +02:00
parent 6ef118fa14
commit a901d4e35a
No known key found for this signature in database
GPG Key ID: D5EC1C72D93244FD
3 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,8 @@
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint", "lint": "next lint",
"init:appwrite": "cd .setup && npm install && npx ts-node index.ts" "init:appwrite": "cd .setup && npm install && npx ts-node index.ts",
"deploy": "docker buildx build -t git.elias.li/stonith404/pingvin-share:latest --platform linux/amd64,linux/arm64 --push ."
}, },
"dependencies": { "dependencies": {
"@mantine/core": "^4.1.3", "@mantine/core": "^4.1.3",

View File

@ -3,14 +3,14 @@ import { AppwriteFileWithPreview } from "../types/File.type";
const get = async (shareId: string, password?: string) => { const get = async (shareId: string, password?: string) => {
return ( return (
await axios.post(`http://localhost:3000/api/share/${shareId}`, { password }) await axios.post(`/api/share/${shareId}`, { password })
).data as AppwriteFileWithPreview[]; ).data as AppwriteFileWithPreview[];
}; };
const authenticateWithPassword = async (shareId: string, password?: string) => { const authenticateWithPassword = async (shareId: string, password?: string) => {
return ( return (
await axios.post( await axios.post(
`http://localhost:3000/api/share/${shareId}/enterPassword`, `/api/share/${shareId}/enterPassword`,
{ password } { password }
) )
).data as AppwriteFileWithPreview[]; ).data as AppwriteFileWithPreview[];

View File

@ -3,7 +3,7 @@ import { Appwrite } from "appwrite";
// SDK for client side (browser) // SDK for client side (browser)
const aw = new Appwrite(); const aw = new Appwrite();
aw.setEndpoint("http://localhost:86/v1") aw.setEndpoint(process.env["APPWRITE_HOST"] as string)
.setProject("pingvin-share"); .setProject("pingvin-share");
export default aw; export default aw;