I have no idea about what is happend. I've developed a server who serves information through an API REST. I have defined several endpoints which works without any problem but the end points defined today doesn't work anyone of them.
The code of my router.js is:
import express from "express";
import {Result} from "../com/result";
import config from "../config";
import {getData, getPhotoFromGIATAServer} from "../com/functions";
import {XMLParser} from "fast-xml-parser";
import fs from "fs";
const router = express.Router();
router.post("/api", async (req, res) => {
});
router.post("/api/destinations", async (req, res) => {
});
router.post("/api/country", async (req, res) => {
});
router.post("/api/media", async (req, res) => {
});
router.post("/api/factsheet", async (req, res) => {
});
router.post("/api/texts", async (req, res) => {
});
router.post("/api/update", async (req, res) => {
});
router.post("/api/photo", async (req, res) => {
});
router.post("/api/update/photos", async (req, res) => {
//Doesn't work
});
router.post("/api/update/texts", async (req, res) => {
//Doesn't work
});
router.post("/api/update/factsheets", async (req, res) => {
//Doesn't work
});
module.exports.Router = router;
All the endpoints works fine except the last three ones. When I make a call to one of them I receive a 404 error.
As you can see, the domain and por in both cases are equals but one of them works and the other one not.
I don't understand anything. What is happend? What am I doing wrong?