You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varexpress=require('express');vardeeplink=require('node-deeplink');varapp=express();constsetDeeplink=(req,res,next)=>{constoptions={url: `detroca.app://detroca/anuncio/${req.params.codigo}`,fallback: 'https://www.detroca.com.br',android_package_name: 'com.app.detroca',title: `Anuncio: ${req.params.codigo}`,}returndeeplink(options)(req,res,next)}app.get('/anuncio/:codigo',setDeeplink)app.listen(3000);console.log('deeplink service listening on port 3000');
I am trying to pass the request parameter to the URL. But it is returning undefined.
var express = require('express');
var deeplink = require('node-deeplink');
var app = express();
let anuncioId;
app.get(
'/anuncio/:codigo',
function (request, response, next) {
anuncioId = request.params.codigo;
console.log('primeiro ' + anuncioId)
return next();
},
deeplink({
url:
detroca.app://detroca/anuncio/${anuncioId}
,fallback: 'https://www.detroca.com.br',
android_package_name: 'com.app.detroca',
title:
Anuncio: ${anuncioId}
})
);
app.listen(3000);
console.log('deeplink service listening on port 3000');
The text was updated successfully, but these errors were encountered: