add folder for playlists api 2
This commit is contained in:
@@ -5,7 +5,7 @@ import { eventHandler } from 'h3'
|
|||||||
export default eventHandler(async (event) => {
|
export default eventHandler(async (event) => {
|
||||||
const id = event.context.params?.id || ''
|
const id = event.context.params?.id || ''
|
||||||
|
|
||||||
const directoryPath = path.join(process.cwd(), 'media/files/music/' + id) // replace 'your-folder' with the folder you want to list
|
const directoryPath = path.join(process.cwd(), '/mnt/media/files/music/' + id) // replace 'your-folder' with the folder you want to list
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Read the directory contents
|
// Read the directory contents
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import path from 'path'
|
|||||||
import { eventHandler } from 'h3'
|
import { eventHandler } from 'h3'
|
||||||
|
|
||||||
export default eventHandler(async (event) => {
|
export default eventHandler(async (event) => {
|
||||||
const directoryPath = path.join(process.cwd(), '/media/files/music')
|
const directoryPath = path.join(process.cwd(), '/mnt/media/files/music')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Read the directory contents
|
// Read the directory contents
|
||||||
|
|||||||
Reference in New Issue
Block a user