bug fixes, migrate API endpoints to .env file, add todo
All checks were successful
Build and Push Nightly CI Image / build_and_push (push) Successful in 1m1s
Build and Push Docker Image / build_and_push (push) Successful in 4s
All checks were successful
Build and Push Nightly CI Image / build_and_push (push) Successful in 1m1s
Build and Push Docker Image / build_and_push (push) Successful in 4s
This commit is contained in:
parent
56603e7e99
commit
07ec59b7d4
@ -94,3 +94,7 @@ A Docker setup requires both Docker *and* Docker Compose.
|
||||
```bash
|
||||
bun dev
|
||||
```
|
||||
|
||||
## To-Do
|
||||
|
||||
* [ ] Add documentation on .env
|
||||
|
@ -20,7 +20,7 @@ export async function GET() {
|
||||
return NextResponse.json({ message: "User not found in database" })
|
||||
}
|
||||
|
||||
const response = await fetch(`https://git.pontusmail.org/api/v1/users/${dbUser.username}`, {
|
||||
const response = await fetch(`${process.env.GITEA_API_URL}/users/${dbUser.username}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${process.env.GITEA_API_KEY}`,
|
||||
"Content-Type": "application/json",
|
||||
|
@ -8,7 +8,7 @@ import { NextResponse } from "next/server"
|
||||
// (3) Migrate a p0ntus mail account to a LibreCloud account (creates/migrates Authentik/Email)
|
||||
|
||||
async function createEmail(email: string, password: string, migrate: boolean) {
|
||||
const response = await axios.post("http://localhost:6723/accounts/add", {
|
||||
const response = await axios.post(`${process.env.MAIL_CONNECT_API_URL}/accounts/add`, {
|
||||
email,
|
||||
password,
|
||||
migrate,
|
||||
@ -61,7 +61,7 @@ export async function POST(request: Request) {
|
||||
const response = await axios.request({
|
||||
method: "post",
|
||||
maxBodyLength: Infinity,
|
||||
url: "https://auth.librecloud.cc/api/v3/core/users/",
|
||||
url: `${process.env.AUTHENTIK_API_URL}/core/users/`,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
@ -89,7 +89,7 @@ export async function POST(request: Request) {
|
||||
const updCfg = await axios.request({
|
||||
method: "post",
|
||||
maxBodyLength: Infinity,
|
||||
url: `https://auth.librecloud.cc/api/v3/core/users/${userID}/set_password/`,
|
||||
url: `${process.env.AUTHENTIK_API_URL}/core/users/${userID}/set_password/`,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${process.env.AUTHENTIK_API_KEY}`,
|
||||
|
@ -1,6 +1,6 @@
|
||||
services:
|
||||
librecloud-web:
|
||||
image: "git.pontusmail.org/librecloud/web:latest"
|
||||
build: .
|
||||
ports:
|
||||
- "3019:3000"
|
||||
environment:
|
||||
|
@ -3,7 +3,6 @@ import type { NextConfig } from "next"
|
||||
/** @type {NextConfig} */
|
||||
const nextConfig: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
output: "standalone",
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user