fix: some bugs
This commit is contained in:
@@ -35,9 +35,9 @@ export async function POST(req: NextRequest) {
|
||||
if (authError) return authError
|
||||
|
||||
// --- Check Nextcloud config ---
|
||||
if (!process.env.NEXTCLOUD_URL || !process.env.NEXTCLOUD_USER || !process.env.NEXTCLOUD_PASSWORD) {
|
||||
if (!process.env.NEXTCLOUD_URL || !process.env.NEXTCLOUD_SHARE_TOKEN) {
|
||||
return NextResponse.json(
|
||||
{ success: false, error: 'Nextcloud non configure sur le serveur' },
|
||||
{ success: false, error: 'Nextcloud non configure sur le serveur (NEXTCLOUD_URL, NEXTCLOUD_SHARE_TOKEN)' },
|
||||
{ status: 500 },
|
||||
)
|
||||
}
|
||||
|
||||
@@ -108,9 +108,11 @@ export async function POST(req: NextRequest) {
|
||||
const isModel = MODEL_EXTENSIONS.has(ext)
|
||||
|
||||
if (isModel) {
|
||||
// Model: always re-push since compression makes size comparison unreliable
|
||||
// Model: always re-push since compression makes size comparison unreliable.
|
||||
// Mark as 'unchanged' for the commit message when the folder already exists,
|
||||
// because we can't know if the model really changed after Blender compression.
|
||||
const remoteSize = remoteFileMap.get(filename.toLowerCase())
|
||||
fileChanges.set(filename.toLowerCase(), remoteSize === undefined ? 'new' : 'changed')
|
||||
fileChanges.set(filename.toLowerCase(), remoteSize === undefined ? 'new' : 'unchanged')
|
||||
changedFilesToPush.push(f)
|
||||
} else {
|
||||
// Texture: compare by size
|
||||
|
||||
Reference in New Issue
Block a user