Path fixes for all environments, npm run format, removed redundant imports
This commit is contained in:
@ -12,6 +12,7 @@ import fs from 'fs'
|
||||
import zoneRepository from '../repositories/zoneRepository'
|
||||
import zoneManager from '../managers/zoneManager'
|
||||
import { httpLogger } from './logger'
|
||||
import { getPublicPath } from './utilities'
|
||||
|
||||
async function addHttpRoutes(app: Application) {
|
||||
/**
|
||||
@ -117,9 +118,9 @@ async function addHttpRoutes(app: Application) {
|
||||
|
||||
let assetPath
|
||||
if (assetType === 'sprites' && spriteId) {
|
||||
assetPath = path.join(process.cwd(), 'public', assetType, spriteId, fileName)
|
||||
assetPath = getPublicPath(assetType, spriteId, fileName)
|
||||
} else {
|
||||
assetPath = path.join(process.cwd(), 'public', assetType, fileName)
|
||||
assetPath = getPublicPath(assetType, fileName)
|
||||
}
|
||||
|
||||
if (!fs.existsSync(assetPath)) {
|
||||
|
Reference in New Issue
Block a user