@lime-husky Thank you, I'm sorry I made a mistake of copying and pasting for the first closing parenthesis, I didn't copy the if before the return serverManifest. The serverManifest returns a .json file to display an icon when I add the link of the application on smartphone screen
Curly braces {}
are used to define the code block that executes when a function is called and using return statement
is encountered within a function, the function will immediately stop executing, and the specified value will be sent back to the code that called the function.
There is a problem with your doGet()
function and that's why the script wont run to fix this you need to remove the additional closing bracket that causes error in your script.
From this:
function doGet(e) {
try {
return serveManifest(); // POINT DE SORTIE 1
}
To this:
function doGet(e) {
try {
// ... Rest of the code here
}catch(error){
// ... rest of the code here
}
}
Reference