rigwild il y a 5 ans
Parent
commit
9c1ba2a7f6
2 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 3 3
      server/functions.js
  2. 1 1
      server/routes/getImage.js

+ 3 - 3
server/functions.js

@@ -72,7 +72,7 @@ export const checkSceneName = sceneName => {
 }
 
 /**
- * Check a file name is valid with configure convention
+ * Check a file name is valid with configured convention
  *
  * @param {string} fileName the file name to check
  * @returns {void}
@@ -80,7 +80,7 @@ export const checkSceneName = sceneName => {
  */
 export const checkFileName = fileName => {
   if (!fileNameConvention.test(fileName))
-    throw new Error(`The file name does not match convention (scene_000150.ext - ${fileNameConvention.toString()}) : "${fileName}"`)
+    throw new Error(`The file name does not match convention (scene_000150.ext - ${fileNameConvention.toString()}) : "${fileName}".`)
 }
 
 /**
@@ -156,7 +156,7 @@ export const getSceneFilesData = async sceneName => {
       acc.set(regexRes[0], fileData)
     }
     catch (err) {
-      failList.push(`Failed to parse file name : ${image}`)
+      failList.push(`Failed to parse file name : "${image}".`)
     }
     return acc
   }, new Map())

+ 1 - 1
server/routes/getImage.js

@@ -23,7 +23,7 @@ const router = express.Router()
  * Get the link and path to an image
  * @param {string} sceneName the scene to get the image from
  * @param {number} qualityInt the requested quality
- * @returns {Image} the link and path to the image
+ * @returns {Promise<Image>} the link and path to the image
  */
 export const getImage = async (sceneName, qualityInt) => {
   const sceneData = await getSceneFilesData(sceneName)