Remove ecosystem configuration file, add Docker entrypoint script, and update deployment workflow to build and push Docker images. Enhance AdminPage with Docker export functionality and improve post management API to use dynamic posts directory path.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
import { getPostsDirectory } from '@/lib/postsDirectory';
|
||||
|
||||
export async function POST(request: NextRequest) {
|
||||
try {
|
||||
@@ -16,7 +17,7 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
// Construct the full path to the item
|
||||
const basePath = process.cwd();
|
||||
const postsDir = path.join(basePath, 'posts');
|
||||
const postsDir = getPostsDirectory();
|
||||
|
||||
// Ensure the posts directory exists
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user