79367900

Date: 2025-01-18 20:15:14
Score: 0.5
Natty:
Report link

POST http://localhost:3333/api/auth/login

{
    "success": true,
    "message": "User logged in successfully",
    "data": {},
    "metadata": {
        "description": "The request has succeeded.",
        "documentation": "https://tools.ietf.org/html/rfc7231#section-6.3.1",
        "responseTime": "466ms",
        "timestamp": "2025-01-18T19:56:52.392Z",
        "code": 200,
        "status": "OK"
    },
    "options": {
        "headers": {
            "Cache-Control": "no-store",
            "Access-Control-Allow-Credentials": "true"
        }
    },
    "links": {
        "self": {
            "rel": "self",
            "href": "localhost:3333/api/auth/login",
            "method": "POST"
        },
        "post-registre": {
            "title": "POST /registre",
            "rel": "post-registre",
            "href": "localhost:3333/api/auth/registre",
            "method": "POST"
        },
        "post-login": {
            "title": "POST /login",
            "rel": "post-login",
            "href": "localhost:3333/api/auth/login",
            "method": "POST"
        },
        "get-current": {
            "title": "GET /current",
            "rel": "get-current",
            "href": "localhost:3333/api/auth/current",
            "method": "GET"
        },
        "get-verify": {
            "title": "GET /verify",
            "rel": "get-verify",
            "href": "localhost:3333/api/auth/verify",
            "method": "GET"
        },
        "get-refreshtoken": {
            "title": "GET /refreshtoken",
            "rel": "get-refreshtoken",
            "href": "localhost:3333/api/auth/refreshtoken",
            "method": "GET"
        },
        "documentation": {
            "rel": "documentation",
            "href": "localhost:3333/docs",
            "method": "GET",
            "title": "API Documentation"
        }
    }
}

GET http://localhost:3333/api/auth/current

{
    "success": true,
    "message": "User fetched successfully",
    "data": {
        "iss": "https://securetoken.google.com/ai-analyst-14876",
        "aud": "ai-analyst-14876",
        "auth_time": 1737230210,
        "user_id": "VMOmNW6sn0hsyghC1hZWeyGECvD3",
        "sub": "VMOmNW6sn0hsyghC1hZWeyGECvD3",
        "iat": 1737230264,
        "exp": 1737233864,
        "email": "[email protected]",
        "email_verified": false,
        "firebase": {
            "identities": {
                "email": [
                    "[email protected]"
                ]
            },
            "sign_in_provider": "password"
        },
        "uid": "VMOmNW6sn0hsyghC1hZWeyGECvD3"
    },
    "metadata": {
        "description": "The request has succeeded.",
        "documentation": "https://tools.ietf.org/html/rfc7231#section-6.3.1",
        "responseTime": "28ms",
        "timestamp": "2025-01-18T19:57:53.520Z",
        "code": 200,
        "status": "OK"
    },
    "links": {
        "self": {
            "rel": "self",
            "href": "localhost:3333/api/auth/current",
            "method": "GET"
        },
        "post-registre": {
            "title": "POST /registre",
            "rel": "post-registre",
            "href": "localhost:3333/api/auth/registre",
            "method": "POST"
        },
        "post-login": {
            "title": "POST /login",
            "rel": "post-login",
            "href": "localhost:3333/api/auth/login",
            "method": "POST"
        },
        "get-current": {
            "title": "GET /current",
            "rel": "get-current",
            "href": "localhost:3333/api/auth/current",
            "method": "GET"
        },
        "get-verify": {
            "title": "GET /verify",
            "rel": "get-verify",
            "href": "localhost:3333/api/auth/verify",
            "method": "GET"
        },
        "get-refreshtoken": {
            "title": "GET /refreshtoken",
            "rel": "get-refreshtoken",
            "href": "localhost:3333/api/auth/refreshtoken",
            "method": "GET"
        },
        "documentation": {
            "rel": "documentation",
            "href": "localhost:3333/docs",
            "method": "GET",
            "title": "API Documentation"
        }
    }
}

GET localhost:3333/api/contact/yQg9OD4KRTNywa2fHwxN

{
    "success": true,
    "message": "Fetched entity by ID successfully",
    "data": {
        "id": "yQg9OD4KRTNywa2fHwxN",
        "name": "Jett Zboncak",
        "email": "[email protected]",
        "phone": "06 26 73 76 92",
        "message": "Interested in your services",
        "createdAt": {
            "_seconds": 1735267038,
            "_nanoseconds": 739000000
        },
        "updatedAt": {
            "_seconds": 1735267038,
            "_nanoseconds": 739000000
        }
    },
    "metadata": {
        "description": "The request has succeeded.",
        "documentation": "https://tools.ietf.org/html/rfc7231#section-6.3.1",
        "timestamp": "2025-01-18T19:59:10.616Z",
        "responseTime": "163ms",
        "code": 200,
        "status": "OK"
    },
    "links": {
        "self": {
            "rel": "self",
            "href": "localhost:3333/api/contact/yQg9OD4KRTNywa2fHwxN",
            "method": "GET"
        },
        "create": {
            "title": "POST /",
            "rel": "create",
            "href": "localhost:3333/api/contact/",
            "method": "POST"
        },
        "collection": {
            "title": "GET /",
            "rel": "collection",
            "href": "localhost:3333/api/contact/",
            "method": "GET"
        },
        "item": {
            "title": "GET /:id",
            "rel": "item",
            "href": "localhost:3333/api/contact/yQg9OD4KRTNywa2fHwxN",
            "method": "GET"
        },
        "update": {
            "title": "PUT /:id",
            "rel": "update",
            "href": "localhost:3333/api/contact/yQg9OD4KRTNywa2fHwxN",
            "method": "PUT"
        },
        "partial-update": {
            "title": "PATCH /:id",
            "rel": "partial-update",
            "href": "localhost:3333/api/contact/yQg9OD4KRTNywa2fHwxN",
            "method": "PATCH"
        },
        "delete": {
            "title": "DELETE /:id",
            "rel": "delete",
            "href": "localhost:3333/api/contact/yQg9OD4KRTNywa2fHwxN",
            "method": "DELETE"
        },
        "documentation": {
            "rel": "documentation",
            "href": "localhost:3333/docs",
            "method": "GET",
            "title": "API Documentation"
        }
    }
}

POST http://localhost:3333/api/contact validation fail

{
    "success": false,
    "message": "Validation Error",
    "error": true,
    "metadata": {
        "description": "The server could not understand the request due to invalid syntax.",
        "documentation": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
        "timestamp": "2025-01-18T17:15:59.353Z",
        "responseTime": "76ms",
        "code": 400,
        "status": "BAD_REQUEST"
    },
    "errors": [
        {
            "field": "lastName",
            "message": "Required"
        },
        {
            "field": "email",
            "message": "Required"
        },
        {
            "field": "phone",
            "message": "Required"
        }
    ],
    "links": {
        "self": {
            "rel": "self",
            "href": "localhost:3333/api/contact",
            "method": "POST"
        },
        "create": {
            "title": "POST /",
            "rel": "create",
            "href": "localhost:3333/api/contact/",
            "method": "POST"
        },
        "collection": {
            "title": "GET /",
            "rel": "collection",
            "href": "localhost:3333/api/contact/",
            "method": "GET"
        },
        "item": {
            "title": "GET /:id",
            "rel": "item",
            "href": "localhost:3333/api/contact/:id",
            "method": "GET"
        },
        "update": {
            "title": "PUT /:id",
            "rel": "update",
            "href": "localhost:3333/api/contact/:id",
            "method": "PUT"
        },
        "partial-update": {
            "title": "PATCH /:id",
            "rel": "partial-update",
            "href": "localhost:3333/api/contact/:id",
            "method": "PATCH"
        },
        "delete": {
            "title": "DELETE /:id",
            "rel": "delete",
            "href": "localhost:3333/api/contact/:id",
            "method": "DELETE"
        },
        "documentation": {
            "rel": "documentation",
            "href": "localhost:3333/docs",
            "method": "GET",
            "title": "API Documentation"
        }
    }
}

http://localhost:3333/api/contactssssssss route not found

{
    "success": false,
    "message": "The requested resource was not found.",
    "error": true,
    "metadata": {
        "description": "The server cannot find the requested resource.",
        "documentation": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
        "timestamp": "2025-01-18T20:07:28.241Z",
        "responseTime": "9ms",
        "code": 404,
        "status": "NOT_FOUND"
    }
}

GET localhost:3333/api/contact/yQg9OD4KRTNywa2fHwxN not login

{
    "success": false,
    "message": "Unauthorized: No token provided",
    "error": true,
    "metadata": {
        "description": "The client must authenticate itself to get the requested response.",
        "documentation": "https://tools.ietf.org/html/rfc7235#section-3.1",
        "timestamp": "2025-01-18T20:08:32.986Z",
        "responseTime": "4ms",
        "code": 401,
        "status": "UNAUTHORIZED"
    }
}

projet: https://github.com/phamhung075/AIanalist-bun-express

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Hung Pham