{"info":{"_postman_id":"31d19037-6eec-4495-abf2-e8fbee21d61a","name":"Natours","description":"<html><head></head><body><p>Natours API 是一套完整的旅游行程解决方案，集成了行程、用户与评论管理等功能。</p>\n<p>它不仅支持用户浏览、创建、更新和删除行程，还能提供详细的统计数据、月度计划和精选推荐，帮助用户全方位了解行程信息。</p>\n<p>用户可以通过该系统完成注册、登录、个人资料查询及密码管理，而管理员则具备获取所有用户信息和彻底删除用户数据的权限。</p>\n<p>同时，评论模块让用户能够发布、查看和编辑对行程的评价。所有接口均采用基于 token 的身份验证，并以 JSON 格式进行数据传输，确保操作既安全又高效</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"43517150","collectionId":"31d19037-6eec-4495-abf2-e8fbee21d61a","publishedId":"2sB2cPk5eA","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-03-30T06:38:19.000Z"},"item":[{"name":"Tours","item":[{"name":"getAllTours","event":[{"listen":"test","script":{"id":"5dce2b09-7cf1-42c5-b05b-c18cd0b23bf5","exec":["var template = `","<style type=\"text/css\">","    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}","    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}","    .tftable tr {background-color:#ffffff;}","    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}","    .tftable tr:hover {background-color:#e0ffff;}","</style>","","<table class=\"tftable\" border=\"1\">","    <tr>","        <th>ID</th>","        <th>Name</th>","        <th>Duration</th>","        <th>Max Group Size</th>","        <th>Difficulty</th>","        <th>Rating Average</th>","        <th>Price</th>","        <th>Secret Tour</th>","    </tr>","    ","    {{#each response.data.docs}}","        <tr>","            <td>{{id}}</td>","            <td>{{name}}</td>","            <td>{{duration}}</td>","            <td>{{maxGroupSize}}</td>","            <td>{{difficulty}}</td>","            <td>{{ratingAverage}}</td>","            <td>{{price}}</td>","            <td>{{secreTour}}</td>","        </tr>","    {{/each}}","</table>","`;","","function constructVisualizerPayload() {","    return { response: pm.response.json() }","}","","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript","packages":{}}}],"id":"05dde641-573b-4e81-8dff-8f2d0d07581c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于获取所有Tour的列表，可支持分页查询、筛选、排序等以便返回部分数据。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>page</td>\n<td>number</td>\n<td>否</td>\n<td>分页页码</td>\n</tr>\n<tr>\n<td>limit</td>\n<td>number</td>\n<td>否</td>\n<td>每页返回数量</td>\n</tr>\n<tr>\n<td>filter</td>\n<td>string</td>\n<td>否</td>\n<td>指定返回Schema中字段满足某个值的结果，eg: difficulty = 'easy'</td>\n</tr>\n<tr>\n<td>sort</td>\n<td>string</td>\n<td>否</td>\n<td>排序</td>\n</tr>\n<tr>\n<td>field</td>\n<td>string</td>\n<td>否</td>\n<td>仅返回特定字，eg: fields=name,price</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>请求示例：</strong></p>\n<p><code>{{URL}}api/v1/tours?page=3&amp;limit=10&amp;sort=-rating,price&amp;fields=name,rating,price</code></p>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"05dde641-573b-4e81-8dff-8f2d0d07581c"},{"name":"createTours","id":"4ee26c17-3c0f-414e-8c70-ae782a59e63d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"test test test\",\n    \"duration\": 2,\n    \"maxGroupSize\": 30,\n    \"difficulty\": \"easy\",\n    \"price\": 400,\n    \"summary\": \"today is a good day\",\n    \"imageCover\": \"test.jpg\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于创建一个新的行程。用户需提交行程的基本信息，如名称、时长、最大团体人数、难度、价格、简介以及封面图片等。</p>\n<p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>是</td>\n<td>行程名称，如 \"A wonderful Tour in New Zealand\"</td>\n</tr>\n<tr>\n<td>duration</td>\n<td>number</td>\n<td>是</td>\n<td>行程时长（单位：天），如 5</td>\n</tr>\n<tr>\n<td>maxGroupSize</td>\n<td>number</td>\n<td>是</td>\n<td>最大团体人数，如 25</td>\n</tr>\n<tr>\n<td>difficulty</td>\n<td>string</td>\n<td>是</td>\n<td>难度等级，如 \"easy\"</td>\n</tr>\n<tr>\n<td>price</td>\n<td>number</td>\n<td>是</td>\n<td>行程价格，如 200</td>\n</tr>\n<tr>\n<td>summary</td>\n<td>string</td>\n<td>是</td>\n<td>行程简介，如 \"Test Summary\"</td>\n</tr>\n<tr>\n<td>imageCover</td>\n<td>string</td>\n<td>是</td>\n<td>封面图片文件名，如 \"test.jpg\"</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>响应参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>number</td>\n<td>状态码，201 表示创建成功</td>\n</tr>\n<tr>\n<td>status</td>\n<td>string</td>\n<td>success 表示创建成功</td>\n</tr>\n<tr>\n<td>data</td>\n<td>object</td>\n<td>包含创建成功的行程的详细信息</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>201</strong>：创建成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或数据验证失败。</p>\n</li>\n<li><p><strong>403</strong>：没有权限。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"0264c94d-cc8b-41e4-a068-5fb1d5bf8f0f","name":"createTours","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"test create tour\",\n    \"duration\": 5,\n    \"maxGroupSize\": 25,\n    \"difficulty\": \"easy\",\n    \"ratingsAverage\": 4.5,\n    \"ratingsQuantity\": 0,\n    \"price\": 200,\n    \"summary\": \"Test Summary\",\n    \"imageCover\": \"test.jpg\",\n    \"guides\": [] \n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"87"},{"key":"Date","value":"Sun, 30 Mar 2025 08:47:21 GMT"},{"key":"X-RateLimit-Reset","value":"1743327498"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"510"},{"key":"ETag","value":"W/\"1fe-tbMt7+oGu67Pnk8H3w+dC/PK/a4\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"name\": \"test create tour\",\n            \"duration\": 5,\n            \"maxGroupSize\": 25,\n            \"difficulty\": \"easy\",\n            \"ratingAverage\": 4.5,\n            \"ratingQuality\": 0,\n            \"price\": 200,\n            \"summary\": \"Test Summary\",\n            \"imageCover\": \"test.jpg\",\n            \"images\": [],\n            \"createdAt\": \"2025-03-30T08:32:20.996Z\",\n            \"startDates\": [],\n            \"secreTour\": false,\n            \"startLocation\": {\n                \"type\": \"Point\",\n                \"coordinates\": []\n            },\n            \"guides\": [],\n            \"_id\": \"67e905199dfd185e0688f564\",\n            \"locations\": [],\n            \"slug\": \"test-create-tour\",\n            \"__v\": 0,\n            \"durationWeeks\": 0.7142857142857143,\n            \"id\": \"67e905199dfd185e0688f564\"\n        }\n    }\n}"}],"_postman_id":"4ee26c17-3c0f-414e-8c70-ae782a59e63d"},{"name":"deleteTour","id":"8a1de255-8f5b-4b6e-a5b0-76f85aa546d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/tours/{{tour_id}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于删除指定的行程信息。删除成功后，将返回 HTTP 状态码 204，响应体为 <code>null</code>。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>tour_id</td>\n<td>string</td>\n<td>是</td>\n<td>行程的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>请求示例：</strong></p>\n<p><code>{{URL}}api/v1/tours/67e6c37bfba19f5090afec40</code></p>\n<p><strong>响应说明：</strong></p>\n<ul>\n<li><p><strong>状态码：</strong> 204 表示删除成功。</p>\n</li>\n<li><p><strong>响应体：</strong> <code>null</code></p>\n</li>\n</ul>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>204：</strong> 删除成功，无返回内容。</p>\n</li>\n<li><p><strong>400：</strong> 请求参数错误。</p>\n</li>\n<li><p><strong>403：</strong> 无权限。</p>\n</li>\n<li><p><strong>404：</strong> 行程不存在。</p>\n</li>\n<li><p><strong>500：</strong> 服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","{{tour_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8a1de255-8f5b-4b6e-a5b0-76f85aa546d2"},{"name":"updateTour","id":"382f416a-4d50-418c-b162-dcb9fa909573","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"update name\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/{{tour_id}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于更新指定行程的信息。支持部分字段更新，用户可根据需要更新任意字段。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>tour_id</td>\n<td>string</td>\n<td>是</td>\n<td>行程的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>否</td>\n<td>行程名称（更新时可选）</td>\n</tr>\n<tr>\n<td>duration</td>\n<td>number</td>\n<td>否</td>\n<td>行程时长（单位：天，更新时可选）</td>\n</tr>\n<tr>\n<td>maxGroupSize</td>\n<td>number</td>\n<td>否</td>\n<td>最大团体人数（更新时可选）</td>\n</tr>\n<tr>\n<td>difficulty</td>\n<td>string</td>\n<td>否</td>\n<td>难度等级（如 easy、medium、hard，更新时可选）</td>\n</tr>\n<tr>\n<td>price</td>\n<td>number</td>\n<td>否</td>\n<td>行程价格（更新时可选）</td>\n</tr>\n<tr>\n<td>summary</td>\n<td>string</td>\n<td>否</td>\n<td>行程简介（更新时可选）</td>\n</tr>\n<tr>\n<td>imageCover</td>\n<td>string</td>\n<td>否</td>\n<td>封面图片文件名（更新时可选）</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：更新成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误。</p>\n</li>\n<li><p><strong>403</strong>：无权限。</p>\n</li>\n<li><p><strong>404：</strong>行程不存在。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","{{tour_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"5e5881c6-7c8f-460c-b76a-5f06e70a6dde","name":"updateTour","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"update name\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/{{tour_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"69"},{"key":"Date","value":"Tue, 01 Apr 2025 02:41:49 GMT"},{"key":"X-RateLimit-Reset","value":"1743478100"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"471"},{"key":"ETag","value":"W/\"1d7-tUsg+akrWXsGRXH7BBcu5SyP6zM\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"startLocation\": {\n                \"type\": \"Point\",\n                \"coordinates\": []\n            },\n            \"_id\": \"67eb4f5cf543958d4e50b8c0\",\n            \"name\": \"update name\",\n            \"duration\": 2,\n            \"maxGroupSize\": 30,\n            \"difficulty\": \"easy\",\n            \"ratingAverage\": 4.5,\n            \"ratingQuality\": 0,\n            \"price\": 400,\n            \"summary\": \"today is a good day\",\n            \"imageCover\": \"test.jpg\",\n            \"images\": [],\n            \"startDates\": [],\n            \"secreTour\": false,\n            \"guides\": [],\n            \"locations\": [],\n            \"slug\": \"test-test-test\",\n            \"__v\": 0,\n            \"durationWeeks\": 0.2857142857142857,\n            \"id\": \"67eb4f5cf543958d4e50b8c0\"\n        }\n    }\n}"}],"_postman_id":"382f416a-4d50-418c-b162-dcb9fa909573"},{"name":"getOneTour","id":"e2c7b7ef-ec35-4018-a3ea-c07e776a38a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/{{tour_id}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于获取指定行程的详细信息。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>tour_id</td>\n<td>string</td>\n<td>是</td>\n<td>行程的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或行程不存在。</p>\n</li>\n<li><p><strong>404：</strong> 行程不存在。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","{{tour_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"69ab0622-9a9a-4817-acca-b7c043cadf48","name":"getOneTour","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/{{tour_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"92"},{"key":"Date","value":"Sun, 30 Mar 2025 11:32:31 GMT"},{"key":"X-RateLimit-Reset","value":"1743336804"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"528"},{"key":"ETag","value":"W/\"210-PeL5O66xZo0HlbM1Bt6zCNO0AZ0\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"startLocation\": {\n                \"type\": \"Point\",\n                \"coordinates\": []\n            },\n            \"_id\": \"67e904ee9dfd185e0688f55f\",\n            \"name\": \"update name\",\n            \"duration\": 5,\n            \"maxGroupSize\": 25,\n            \"difficulty\": \"easy\",\n            \"ratingAverage\": 4.5,\n            \"ratingQuality\": 0,\n            \"price\": 397,\n            \"summary\": \"Breathtaking hike through the Canadian Banff National Park\",\n            \"imageCover\": \"tour-1-cover.jpg\",\n            \"images\": [],\n            \"startDates\": [],\n            \"secreTour\": false,\n            \"guides\": [],\n            \"locations\": [],\n            \"slug\": \"22333wsw2cc\",\n            \"__v\": 0,\n            \"durationWeeks\": 0.7142857142857143,\n            \"reviews\": [],\n            \"id\": \"67e904ee9dfd185e0688f55f\"\n        }\n    }\n}"}],"_postman_id":"e2c7b7ef-ec35-4018-a3ea-c07e776a38a0"},{"name":"ReferenceAPI","id":"d2e11404-30a5-4059-88f0-b9506f2ca610","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://natours.dev/api/v1/tours","urlObject":{"protocol":"https","path":["api","v1","tours"],"host":["natours","dev"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2e11404-30a5-4059-88f0-b9506f2ca610"},{"name":"top-5-cheap","id":"746ba715-9dc8-4c94-be50-81da4ab8e9ac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/top-5-cheap","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于获取价格最低且评分最高的五个行程，帮助用户快速找到性价比高的行程推荐。</p>\n<p><strong>请求参数：</strong>  </p>\n<p>无</p>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回符合条件的行程列表。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或数据不存在。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","top-5-cheap"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"c6176ce2-8111-49fa-954f-c8cfa60500e6","name":"top-5-cheap","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/top-5-cheap"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"91"},{"key":"Date","value":"Sun, 30 Mar 2025 11:34:49 GMT"},{"key":"X-RateLimit-Reset","value":"1743336804"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"701"},{"key":"ETag","value":"W/\"2bd-tq2iCXICfolgkYrcN2c76ptcBWM\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 3,\n    \"data\": {\n        \"docs\": [\n            {\n                \"_id\": \"67e905199dfd185e0688f564\",\n                \"name\": \"test create tour\",\n                \"difficulty\": \"easy\",\n                \"ratingAverage\": 4.5,\n                \"price\": 200,\n                \"summary\": \"Test Summary\",\n                \"guides\": [],\n                \"durationWeeks\": null,\n                \"id\": \"67e905199dfd185e0688f564\"\n            },\n            {\n                \"_id\": \"67e9277cdc39169620366e74\",\n                \"name\": \"test 1create tour\",\n                \"difficulty\": \"easy\",\n                \"ratingAverage\": 4.5,\n                \"price\": 200,\n                \"summary\": \"Test Summary\",\n                \"guides\": [],\n                \"durationWeeks\": null,\n                \"id\": \"67e9277cdc39169620366e74\"\n            },\n            {\n                \"_id\": \"67e904ee9dfd185e0688f55f\",\n                \"name\": \"update name\",\n                \"difficulty\": \"easy\",\n                \"ratingAverage\": 4.5,\n                \"price\": 397,\n                \"summary\": \"Breathtaking hike through the Canadian Banff National Park\",\n                \"guides\": [],\n                \"durationWeeks\": null,\n                \"id\": \"67e904ee9dfd185e0688f55f\"\n            }\n        ]\n    }\n}"}],"_postman_id":"746ba715-9dc8-4c94-be50-81da4ab8e9ac"},{"name":"tour-stats","id":"0f9ae6c2-9f90-4387-846e-aafcb84294d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tour-stats","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于统计行程相关的数据，如不同难度下的行程数量、评分数量、平均评分、平均价格、最低价格及最高价格等。</p>\n<p><strong>请求参数：</strong>  </p>\n<p>无</p>\n<p><strong>响应字段说明：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status</td>\n<td>string</td>\n<td>请求状态，成功时返回 \"success\"</td>\n</tr>\n<tr>\n<td>data</td>\n<td>array</td>\n<td>统计数据数组，每个对象代表一个难度等级的统计信息</td>\n</tr>\n<tr>\n<td>_id</td>\n<td>string</td>\n<td>分组标识，通常表示行程的难度（如 \"easy\"）</td>\n</tr>\n<tr>\n<td>numTours</td>\n<td>number</td>\n<td>该组别下的行程数量</td>\n</tr>\n<tr>\n<td>numRatings</td>\n<td>number</td>\n<td>该组别下所有行程的总评分数</td>\n</tr>\n<tr>\n<td>avgRating</td>\n<td>number</td>\n<td>平均评分</td>\n</tr>\n<tr>\n<td>avgPrice</td>\n<td>number</td>\n<td>平均价格</td>\n</tr>\n<tr>\n<td>minPrice</td>\n<td>number</td>\n<td>最低价格</td>\n</tr>\n<tr>\n<td>maxPrice</td>\n<td>number</td>\n<td>最高价格</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，并返回统计数据。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","tour-stats"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"2e8817b8-96e2-4f90-8646-de91602106be","name":"tour-stats","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tour-stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"90"},{"key":"Date","value":"Sun, 30 Mar 2025 11:37:16 GMT"},{"key":"X-RateLimit-Reset","value":"1743336804"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"147"},{"key":"ETag","value":"W/\"93-krVeCxi6V0l0FcQNIV2v+XFogxY\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"_id\": \"easy\",\n            \"numTours\": 3,\n            \"numRatings\": 0,\n            \"avgRating\": 4.5,\n            \"avgPrice\": 265.6666666666667,\n            \"minPrice\": 200,\n            \"maxPrice\": 397\n        }\n    ]\n}"}],"_postman_id":"0f9ae6c2-9f90-4387-846e-aafcb84294d3"},{"name":"monthly-plan","id":"50031294-618b-4136-bf54-aee217c7f7a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/monthly-plan/{{year}}","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于获取指定年份内，每个月份开始的行程统计数据以及相关行程名称，帮助用户了解全年各月的行程安排情况。</p>\n<p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>year</td>\n<td>number</td>\n<td>是</td>\n<td>查询的年份，如 2021</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回指定年份内每月行程计划数据。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误，例如年份格式不正确。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","monthly-plan","{{year}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"50031294-618b-4136-bf54-aee217c7f7a7"}],"id":"f354f60c-a221-4415-b82b-7115d4a8dc3a","description":"<p>Tour API 可以获取所有旅游信息、创建新旅游项目、编辑和删除现有旅游项目。此外，还提供了一些特殊接口，以满足特定的业务需求，帮助用户高效便捷地管理旅游数据。</p>\n","_postman_id":"f354f60c-a221-4415-b82b-7115d4a8dc3a"},{"name":"Reviews","item":[{"name":"getAllReviews","id":"dde64c0d-e5df-41e3-b619-1f105fe87e01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于获取所有用户评论的列表。可根据业务需求在实际应用中增加分页、筛选等查询参数。</p>\n<p><strong>响应参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>number</td>\n<td>状态码，200 表示请求成功</td>\n</tr>\n<tr>\n<td>status</td>\n<td>string</td>\n<td>success 表示请求成功</td>\n</tr>\n<tr>\n<td>data</td>\n<td>object</td>\n<td>包含所有评论的详细信息</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回评论详情。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误。</p>\n</li>\n<li><p><strong>403</strong>：评论不存在。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"dde64c0d-e5df-41e3-b619-1f105fe87e01"},{"name":"creatReviews","event":[{"listen":"test","script":{"id":"76ac7d5f-2b85-45a1-8cba-659228ecc357","exec":["pm.test(\"Response status code is 200\", function () {","    pm.response.to.have.status(200);","  });","","","pm.test(\"Response time is less than 500ms\", function () {","  pm.expect(pm.response.responseTime).to.be.below(500);","});","","","pm.test(\"Response has the required fields as per the schema\", function () {","    const responseData = pm.response.json();","    ","    pm.expect(responseData).to.be.an('object');","    pm.expect(responseData).to.have.property('id');","    pm.expect(responseData).to.have.property('user');","    pm.expect(responseData).to.have.property('rating');","    pm.expect(responseData).to.have.property('comment');","    pm.expect(responseData).to.have.property('date');","});","","","pm.test(\"Id field is a non-empty string\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData).to.be.an('object');","  pm.expect(responseData.id).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Id field should be a non-empty string\");","});","","","pm.test(\"Content field is a non-empty string\", function () {","  const responseData = pm.response.json();","  ","  pm.expect(responseData.content).to.be.a('string').and.to.have.lengthOf.at.least(1, \"Content field should not be empty\");","});",""],"type":"text/javascript","packages":{}}}],"id":"3ccfb4ec-6175-4bc8-8322-bf91ba9d48d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"Tempus curabitur faucibus auctor bibendum duis gravida tincidunt litora himenaeos facilisis vivamus vehicula potenti semper fusce suspendisse sagittis!\",\n    \"rating\": 4\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于为指定行程添加新的评论。用户需提交评论内容、评分、提交评论的用户 ID 以及对应的行程 ID。</p>\n<p><strong>请求体参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>review</td>\n<td>string</td>\n<td>是</td>\n<td>评论内容</td>\n</tr>\n<tr>\n<td>rating</td>\n<td>number</td>\n<td>是</td>\n<td>行程评分</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>响应说明：</strong></p>\n<p>响应将包含评论提交的状态信息以及新创建评论的详细数据，会自动关联当前userId。</p>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>201</strong>：请求成功，评论添加成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或数据验证失败。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"f1cd5479-5e10-41d8-8c59-0509cb6750f9","name":"creatReviews","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"Tempus curabitur faucibus auctor bibendum duis gravida tincidunt litora himenaeos facilisis vivamus vehicula potenti semper fusce suspendisse sagittis!\",\n    \"rating\": 4\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"52"},{"key":"Date","value":"Tue, 01 Apr 2025 03:00:25 GMT"},{"key":"X-RateLimit-Reset","value":"1743478100"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"358"},{"key":"ETag","value":"W/\"166-/+GhV/uFbLn9oGSIhVLsSi5hRUY\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"review\": \"Tempus curabitur faucibus auctor bibendum duis gravida tincidunt litora himenaeos facilisis vivamus vehicula potenti semper fusce suspendisse sagittis!\",\n            \"rating\": 4,\n            \"createdAt\": \"2025-04-01T02:27:40.956Z\",\n            \"user\": \"67e903d99dfd185e0688f554\",\n            \"_id\": \"67eb56c9f543958d4e50b900\",\n            \"__v\": 0,\n            \"id\": \"67eb56c9f543958d4e50b900\"\n        }\n    }\n}"}],"_postman_id":"3ccfb4ec-6175-4bc8-8322-bf91ba9d48d1"},{"name":"get review","id":"206566be-b86c-4dea-9e6f-485d1db676a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/{{review_id}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于获取指定评论的详细信息，包括评论内容、评分、提交评论的用户、关联的行程以及创建时间等。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>review_id</td>\n<td>string</td>\n<td>是</td>\n<td>评论的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>请求示例：</strong></p>\n<p><code>{{URL}}api/v1/reviews/67e8bcc297b5894f79d1c72f</code></p>\n<p><strong>响应参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>number</td>\n<td>状态码，200 表示请求成功</td>\n</tr>\n<tr>\n<td>status</td>\n<td>string</td>\n<td>success 表示请求成功</td>\n</tr>\n<tr>\n<td>data</td>\n<td>object</td>\n<td>包含单条评论的详细信息</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回评论详情。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误。</p>\n</li>\n<li><p><strong>403</strong>：评论不存在。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","reviews","{{review_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"87b9e5f8-d437-4048-9554-1bd6dadd9f81","name":"get review","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/{{review_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"26"},{"key":"Date","value":"Tue, 01 Apr 2025 03:24:04 GMT"},{"key":"X-RateLimit-Reset","value":"1743478100"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"270"},{"key":"ETag","value":"W/\"10e-PpWaNqZWHUChbCySL34USCeEL20\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"_id\": \"67eb5a8bf543958d4e50b926\",\n            \"review\": \"fewbres\",\n            \"rating\": 3,\n            \"createdAt\": \"2025-04-01T02:27:40.956Z\",\n            \"tour\": \"67eb4f5cf543958d4e50b8c0\",\n            \"user\": {\n                \"_id\": \"67e903d99dfd185e0688f554\",\n                \"name\": \"user\"\n            },\n            \"__v\": 0,\n            \"id\": \"67eb5a8bf543958d4e50b926\"\n        }\n    }\n}"}],"_postman_id":"206566be-b86c-4dea-9e6f-485d1db676a0"},{"name":"updateReview","id":"16befb7c-f587-42d8-a9fb-4b3ee8f4b9ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"update review\",\n    \"rating\": 2\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/{{review_id}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于更新指定评论的部分字段，如评论内容和评分。只需提交需要更新的字段，其他字段保持不变。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>review_id</td>\n<td>string</td>\n<td>是</td>\n<td>评论的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>请求体参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>review</td>\n<td>string</td>\n<td>否</td>\n<td>更新后的评论内容</td>\n</tr>\n<tr>\n<td>rating</td>\n<td>number</td>\n<td>否</td>\n<td>更新后的评分（如 1-5 之间）</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，评论更新成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误。</p>\n</li>\n<li><p><strong>403</strong>：评论不存在。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","reviews","{{review_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"16befb7c-f587-42d8-a9fb-4b3ee8f4b9ad"},{"name":"deleteReview","id":"6fa7302a-65e7-46b5-872f-85596deccbee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/{{review_id}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于删除指定的评论。删除成功后，接口将返回 HTTP 状态码 204，响应体为空。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>review_id</td>\n<td>string</td>\n<td>是</td>\n<td>评论的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>响应说明：</strong></p>\n<p>成功删除评论后，接口将返回 HTTP 状态码 204，且响应体为空。</p>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>204：</strong> 删除成功，无返回内容。</p>\n</li>\n<li><p><strong>400：</strong> 请求参数错误或评论不存在。</p>\n</li>\n<li><p><strong>403</strong>：评论不存在。</p>\n</li>\n<li><p><strong>500：</strong> 服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","reviews","{{review_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6fa7302a-65e7-46b5-872f-85596deccbee"}],"id":"e923e2ac-17e0-4017-a0c3-bb657ca95a38","description":"<p>Review API 提供了基础的增删改查（CRUD）功能，用于管理用户对旅游项目的评价。每条评价都关联特定的旅游项目（Tour）和用户（User），确保评价数据的完整性和可追溯性，使系统能够有效地管理用户反馈。</p>\n","_postman_id":"e923e2ac-17e0-4017-a0c3-bb657ca95a38"},{"name":"Tours/Reviews","item":[{"name":"get reviews from on tour","id":"e9e6c4b7-49b1-4dc2-85d5-7f99039fac34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/{{tour_id}}/reviews","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于获取指定行程下的所有评论数据。通过提供行程的唯一标识符，返回该行程相关的评论列表，方便用户查看该行程的评价和反馈信息。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>tour_id</td>\n<td>string</td>\n<td>是</td>\n<td>行程的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p>每个评论对象可能包含以下字段：</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>字段名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>评论的唯一标识符</td>\n</tr>\n<tr>\n<td>review</td>\n<td>string</td>\n<td>评论内容</td>\n</tr>\n<tr>\n<td>rating</td>\n<td>number</td>\n<td>评分（如 1-5 之间的分数）</td>\n</tr>\n<tr>\n<td>user</td>\n<td>string</td>\n<td>提交评论的用户 ID 或用户名</td>\n</tr>\n<tr>\n<td>tour</td>\n<td>string</td>\n<td>当前的行程ID</td>\n</tr>\n<tr>\n<td>createdAt</td>\n<td>string</td>\n<td>评论创建时间（ISO 格式）</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回评论列表。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或行程不存在。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","{{tour_id}}","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"aaf27f74-e312-4636-8795-f48c33452556","name":"get reviews from on tour","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/{{tour_id}}/reviews"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"39"},{"key":"Date","value":"Tue, 01 Apr 2025 03:18:41 GMT"},{"key":"X-RateLimit-Reset","value":"1743478100"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"276"},{"key":"ETag","value":"W/\"114-Vr+tDyaEuiAVj7y2d1WqTl0eQvI\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 1,\n    \"data\": {\n        \"docs\": [\n            {\n                \"_id\": \"67eb5a8bf543958d4e50b926\",\n                \"review\": \"fewbres\",\n                \"rating\": 3,\n                \"createdAt\": \"2025-04-01T02:27:40.956Z\",\n                \"tour\": \"67eb4f5cf543958d4e50b8c0\",\n                \"user\": {\n                    \"_id\": \"67e903d99dfd185e0688f554\",\n                    \"name\": \"user\"\n                },\n                \"id\": \"67eb5a8bf543958d4e50b926\"\n            }\n        ]\n    }\n}"}],"_postman_id":"e9e6c4b7-49b1-4dc2-85d5-7f99039fac34"},{"name":"create reviews from tour","id":"1cad78ee-fdac-4a66-821f-9f9f41dab295","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"rating\":4,\n    \"review\": \"sssee\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/{{tour_id}}/reviews","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于为指定行程创建新的评论。用户需提交评论内容和评分信息，评论将与对应的行程、用户进行关联。并自动更新该行程的评分</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>tour_id</td>\n<td>string</td>\n<td>是</td>\n<td>行程的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>review</td>\n<td>string</td>\n<td>是</td>\n<td>评论内容</td>\n</tr>\n<tr>\n<td>rating</td>\n<td>number</td>\n<td>是</td>\n<td>行程评分，通常范围为 1-5</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，评论创建成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或数据验证失败。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","{{tour_id}}","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"d73da56c-3551-4d8a-bffa-a3091f0049c0","name":"create reviews from tour","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"rating\":3,\n    \"review\": \"fewbres\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/{{tour_id}}/reviews"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"42"},{"key":"Date","value":"Tue, 01 Apr 2025 03:16:25 GMT"},{"key":"X-RateLimit-Reset","value":"1743478100"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"248"},{"key":"ETag","value":"W/\"f8-U7Peu0kppi3O56wgbdX+r1Enhfk\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"review\": \"fewbres\",\n            \"rating\": 3,\n            \"createdAt\": \"2025-04-01T02:27:40.956Z\",\n            \"tour\": \"67eb4f5cf543958d4e50b8c0\",\n            \"user\": \"67e903d99dfd185e0688f554\",\n            \"_id\": \"67eb5a8bf543958d4e50b926\",\n            \"__v\": 0,\n            \"id\": \"67eb5a8bf543958d4e50b926\"\n        }\n    }\n}"}],"_postman_id":"1cad78ee-fdac-4a66-821f-9f9f41dab295"}],"id":"ad9106d4-c220-4cf3-b4c4-22aacba9779b","description":"<p>Tours/Reviews 文件夹包含两个主要接口，一个用于为指定行程创建评论，允许用户提交评论内容、评分、用户ID和行程ID，将评论与对应行程关联；另一个用于获取与行程相关的所有评论数据，便于展示用户反馈和评分信息。</p>\n","_postman_id":"ad9106d4-c220-4cf3-b4c4-22aacba9779b"},{"name":"Users","item":[{"name":"getMe","id":"e5942f78-0892-447f-bf62-d786d293f383","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/getMe","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于获取当前已认证用户的详细信息，包括用户 ID、姓名、邮箱、角色等。需要确保请求中携带有效的token</p>\n<p><strong>响应字段说明：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>_id</td>\n<td>string</td>\n<td>用户的唯一标识符</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>用户姓名</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>用户邮箱</td>\n</tr>\n<tr>\n<td>role</td>\n<td>string</td>\n<td>用户角色，如 \"user\" 或 \"admin\"</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回当前用户信息。</p>\n</li>\n<li><p><strong>401</strong>：未认证，缺少有效的身份验证凭据。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","getMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"08237983-9d74-4b4f-8c6b-bca06879b9b4","name":"getMe","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/users/getMe"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"23"},{"key":"Date","value":"Tue, 01 Apr 2025 03:26:03 GMT"},{"key":"X-RateLimit-Reset","value":"1743478100"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"132"},{"key":"ETag","value":"W/\"84-7gy86Tcysu8EPJvwEShidrUJgrg\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"_id\": \"67e904539dfd185e0688f55a\",\n            \"name\": \"test\",\n            \"email\": \"test@gmail.com\",\n            \"role\": \"user\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"e5942f78-0892-447f-bf62-d786d293f383"},{"name":"updateMe","id":"d854bb0d-927c-4f0b-9180-521af3198a34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"test\",\n    \"role\":\"admin\"\n    \n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMe","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于更新当前已认证用户的信息。用户可以通过提交更新后的姓名或其他可修改字段来更新个人信息。请确保请求中携带有效的token。</p>\n<p><strong>请求体参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>否</td>\n<td>用户姓名，更新后返回新姓名</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回更新后的用户信息。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或更新失败。</p>\n</li>\n<li><p><strong>401</strong>：未认证或认证失败。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n<p><strong>备注：</strong>  </p>\n<p>请确保在实际请求中携带正确的身份验证信息，部分用户信息可能为只读属性，不允许更新。根据实际业务需求，返回的字段及错误码可进行适当调整。</p>\n","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"cabd736f-6489-4863-bcf3-5b9e2ac41679","name":"updateMe","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"test\",\n    \"role\":\"admin\"\n    \n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMe"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"96"},{"key":"Date","value":"Tue, 01 Apr 2025 03:33:57 GMT"},{"key":"X-RateLimit-Reset","value":"1743481631"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"132"},{"key":"ETag","value":"W/\"84-Q0xcbVKxOk8J+u/+ltjTIFA5qh4\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"67e904539dfd185e0688f55a\",\n            \"name\": \"test\",\n            \"email\": \"test@gmail.com\",\n            \"role\": \"user\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"d854bb0d-927c-4f0b-9180-521af3198a34"},{"name":"deleteMe","id":"db65dc78-0dac-4e0e-b509-9f5c87c2a1f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/deleteMe","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于删除当前已认证用户的账号，即注销账号。调用此接口后，当前active将被置为false，用户的账号及相关数据将被隐藏不再返回，也无法登陆使用。</p>\n<p><strong>响应说明：</strong>  </p>\n<p>成功删除用户后，接口返回操作状态，响应数据通常为空（<code>null</code> 或无内容）。</p>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>204</strong>：请求成功，用户删除成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或账号状态异常。</p>\n</li>\n<li><p><strong>401</strong>：未认证或身份验证失败。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","deleteMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"db65dc78-0dac-4e0e-b509-9f5c87c2a1f6"},{"name":"getAllusers","id":"b3bbeba4-0f85-4b23-9751-bcaa65d6e476","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于获取系统中所有用户的详细信息。由于涉及用户隐私和系统安全，此接口仅允许管理员角色（admin）调用，请确保请求中携带有效的管理员身份验证凭据。</p>\n<p><strong>响应说明：</strong>  </p>\n<p>成功调用时，返回包含所有用户信息的数组，每个用户对象包含用户 ID、姓名、邮箱、角色等字段。</p>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回所有用户数据。</p>\n</li>\n<li><p><strong>401</strong>：未认证或认证失败（例如未提供有效的管理员令牌）。</p>\n</li>\n<li><p><strong>403</strong>：无权限访问该接口（当前用户不是管理员）。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"39331c02-e254-4a06-ba1c-f019974eeb63","name":"getAllusers","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"86"},{"key":"Date","value":"Tue, 01 Apr 2025 03:39:29 GMT"},{"key":"X-RateLimit-Reset","value":"1743481631"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"589"},{"key":"ETag","value":"W/\"24d-vVRHG5fQEQec7+zc4I4Koy9KC0E\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 6,\n    \"data\": {\n        \"docs\": [\n            {\n                \"_id\": \"67e903cd9dfd185e0688f552\",\n                \"name\": \"admin\",\n                \"email\": \"admin@gmail.com\",\n                \"role\": \"admin\"\n            },\n            {\n                \"_id\": \"67e903d99dfd185e0688f554\",\n                \"name\": \"user\",\n                \"email\": \"user@gmail.com\",\n                \"role\": \"user\"\n            },\n            {\n                \"_id\": \"67e903ea9dfd185e0688f556\",\n                \"name\": \"guide\",\n                \"email\": \"guide@gmail.com\",\n                \"role\": \"guide\"\n            },\n            {\n                \"_id\": \"67e915f4dc39169620366e5b\",\n                \"name\": \"t\",\n                \"email\": \"test1@gmail.com\",\n                \"role\": \"user\"\n            },\n            {\n                \"_id\": \"67e91638dc39169620366e60\",\n                \"name\": \"test\",\n                \"email\": \"test1@gmail.com。io\",\n                \"role\": \"user\"\n            },\n            {\n                \"_id\": \"67e916b6dc39169620366e66\",\n                \"name\": \"test\",\n                \"email\": \"test2@gmail.com\",\n                \"role\": \"user\"\n            }\n        ]\n    }\n}"}],"_postman_id":"b3bbeba4-0f85-4b23-9751-bcaa65d6e476"},{"name":"getUser","id":"d58dca22-fd62-4cd5-9e45-a55d83848eaa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/{{user_id}}","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于获取指定用户的详细信息。通过在 URL 中传递用户的唯一标识符，可以返回对应用户的姓名、邮箱、角色等信息。仅管理员可调用该接口。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>是</td>\n<td>用户的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回用户信息。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或用户 ID 格式不正确。</p>\n</li>\n<li><p><strong>401</strong>：未认证或身份验证失败。</p>\n</li>\n<li><p><strong>404</strong>：未找到对应用户。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","{{user_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"f7c0c0b8-644b-41de-b111-52e61b4dfaae","name":"getUser","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/users/{{user_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"79"},{"key":"Date","value":"Tue, 01 Apr 2025 03:42:39 GMT"},{"key":"X-RateLimit-Reset","value":"1743481631"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"132"},{"key":"ETag","value":"W/\"84-dgmK+VNdzjtyiO6IhHnObnSibjI\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"_id\": \"67e903d99dfd185e0688f554\",\n            \"name\": \"user\",\n            \"email\": \"user@gmail.com\",\n            \"role\": \"user\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"d58dca22-fd62-4cd5-9e45-a55d83848eaa"},{"name":"updateUser","id":"6107aafa-1895-42cd-a5c2-b943949b75d8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"testupdate\",\n    \"role\": \"admin\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/{{user_id}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于更新指定用户的部分信息。只有管理员或用户本人才有权限调用此接口。更新的字段可包括姓名、邮箱、角色等信息。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>是</td>\n<td>用户的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>请求体参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>否</td>\n<td>用户姓名（更新后返回新姓名）</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>否</td>\n<td>用户邮箱（更新后返回新邮箱）</td>\n</tr>\n<tr>\n<td>role</td>\n<td>string</td>\n<td>否</td>\n<td>用户角色（如 admin 或 user）</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，返回更新后的用户信息。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或数据验证失败。</p>\n</li>\n<li><p><strong>401</strong>：未认证或身份验证失败。</p>\n</li>\n<li><p><strong>404</strong>：未找到对应用户。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","{{user_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"39d205dd-b6d5-42b2-a221-f5a30436bb21","name":"updateUser","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"testupdate\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/{{user_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"76"},{"key":"Date","value":"Tue, 01 Apr 2025 03:44:25 GMT"},{"key":"X-RateLimit-Reset","value":"1743481631"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"138"},{"key":"ETag","value":"W/\"8a-SgFu6pEOzyFAqXSE3EmMA4LldUI\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"_id\": \"67e903d99dfd185e0688f554\",\n            \"name\": \"testupdate\",\n            \"email\": \"user@gmail.com\",\n            \"role\": \"user\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"6107aafa-1895-42cd-a5c2-b943949b75d8"},{"name":"createUser","id":"440fc615-308c-44ea-8d55-2518ff6fb195","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"admin\",\n  \"email\": \"admin22@gmail.com\",\n  \"password\": \"12345678\",\n  \"passwordConfirm\": \"12345678\",\n  \"role\": \"admin\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users","description":"<p>This route is not defined! Please use /signup instead.</p>\n","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"440fc615-308c-44ea-8d55-2518ff6fb195"},{"name":"deleteUser","id":"7104dfd8-75d0-4da4-b6c2-47fb017baf4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/{{user_id}}","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于管理员从数据库中彻底删除指定用户的数据。与 <code>deleteMe</code> 接口仅做软删除（保留数据）不同，此接口会真实删除用户记录，因此操作不可恢复。请确保只有具备管理员权限的用户才能调用此接口。</p>\n<p><strong>路径参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user_id</td>\n<td>string</td>\n<td>是</td>\n<td>要删除的用户的唯一标识符</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>204</strong>：请求成功，用户已被永久删除。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或用户 ID 格式不正确。</p>\n</li>\n<li><p><strong>401</strong>：未认证或身份验证失败。</p>\n</li>\n<li><p><strong>403</strong>：无权限操作（当前用户非管理员）。</p>\n</li>\n<li><p><strong>404</strong>：未找到指定用户。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","{{user_id}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7104dfd8-75d0-4da4-b6c2-47fb017baf4d"}],"id":"d5b041b4-1e28-458f-90ce-52ed4756a90c","_postman_id":"d5b041b4-1e28-458f-90ce-52ed4756a90c","description":""},{"name":"Authentication","item":[{"name":"signup","event":[{"listen":"test","script":{"id":"78a0e4de-7568-4b3c-9f75-3c8c64f04332","exec":["pm.environment.set(\"jwt\", pm.response.json().token)"],"type":"text/javascript","packages":{}}}],"id":"2c218ff4-e5bd-4d00-a26b-cfb27136af91","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"test\",\n  \"email\": \"test3@gmail.com\",\n  \"password\": \"{{password}}\",\n  \"passwordConfirm\": \"{{password}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup","description":"<p><strong>接口说明：</strong><br />该接口用于用户注册，用户通过提交必要的注册信息完成账号创建。注册成功后，可返回用户相关信息及身份验证令牌。</p>\n<p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>是</td>\n<td>用户名</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>是</td>\n<td>用户电子邮箱，用于验证和通知，需保持唯一</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>是</td>\n<td>用户密码，长度最短8位</td>\n</tr>\n<tr>\n<td>confirmPassword</td>\n<td>string</td>\n<td>否</td>\n<td>确认密码（需与 password 保持一致）</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>响应参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>number</td>\n<td>状态码，200 表示成功，其它状态表示错误</td>\n</tr>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>用户注册成功后返回身份验证令牌</td>\n</tr>\n<tr>\n<td>data</td>\n<td>object</td>\n<td>包含用户相关信息，如用户ID、用户名、邮箱等</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>201</strong>：请求成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或数据校验失败（例如用户名已存在、邮箱格式不正确）。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，建议稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"9461a0e4-4c2d-48a5-98d2-8586d216a9b8","name":"signup","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"test\",\n  \"email\": \"test@gmail.com\",\n  \"password\": \"{{password}}\",\n  \"passwordConfirm\": \"{{password}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"92"},{"key":"Date","value":"Sun, 30 Mar 2025 08:44:03 GMT"},{"key":"X-RateLimit-Reset","value":"1743327498"},{"key":"Set-Cookie","value":"jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZTkwNDUzOWRmZDE4NWUwNjg4ZjU1YSIsImlhdCI6MTc0MzMyNDI0MywiZXhwIjoxNzQzMzI2MDQzfQ.eCfDr-nOuovrdHmoCPaV2j-g-D9THqGKfTjHC4WjUnU; Path=/; Expires=Sun, 30 Mar 2025 09:14:03 GMT; HttpOnly"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"328"},{"key":"ETag","value":"W/\"148-Z5Id+l465QGiIv1poEcqRAZKPI8\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZTkwNDUzOWRmZDE4NWUwNjg4ZjU1YSIsImlhdCI6MTc0MzMyNDI0MywiZXhwIjoxNzQzMzI2MDQzfQ.eCfDr-nOuovrdHmoCPaV2j-g-D9THqGKfTjHC4WjUnU\",\n    \"data\": {\n        \"user\": {\n            \"name\": \"test\",\n            \"email\": \"test@gmail.com\",\n            \"role\": \"user\",\n            \"active\": true,\n            \"_id\": \"67e904539dfd185e0688f55a\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"2c218ff4-e5bd-4d00-a26b-cfb27136af91"},{"name":"login","event":[{"listen":"prerequest","script":{"id":"f23631cf-d067-46ba-821a-2df00272da5a","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"3eb245e2-5a37-4486-b743-25a12eb06ee4","exec":["pm.environment.set(\"jwt\", pm.response.json().token)"],"type":"text/javascript","packages":{}}}],"id":"84939d9f-dedc-4d72-b2f2-41c9b824e857","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"email\": \"admin@gmail.com\",\n  \"password\": \"{{password}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login","description":"<p><strong>接口说明：</strong><br />该接口用于用户登录，通过提交用户名和密码获取用户身份验证令牌及相关用户信息。</p>\n<p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>username</td>\n<td>string</td>\n<td>是</td>\n<td>用户的登录名</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>是</td>\n<td>用户的登录密码</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>响应参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status</td>\n<td>string</td>\n<td>success 表示成功，其它表示错误</td>\n</tr>\n<tr>\n<td>token</td>\n<td>string</td>\n<td>用户登录成功后返回的身份验证令牌</td>\n</tr>\n<tr>\n<td>data</td>\n<td>object</td>\n<td>包含用户相关信息，如name, email, role, id等</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误。</p>\n</li>\n<li><p><strong>401</strong>：用户名/密码错误。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"351e5152-0b41-4ffc-8d07-6075042ab309","name":"login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"email\": \"user@gmail.com\",\n  \"password\": \"{{password}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"93"},{"key":"Date","value":"Sun, 30 Mar 2025 08:43:45 GMT"},{"key":"X-RateLimit-Reset","value":"1743327498"},{"key":"Set-Cookie","value":"jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZTkwM2Q5OWRmZDE4NWUwNjg4ZjU1NCIsImlhdCI6MTc0MzMyNDIyNiwiZXhwIjoxNzQzMzI2MDI2fQ.slEZgSkKyvbiAe2LJ7Bmp0XByDElRdHYzJBD-pG-ZTw; Path=/; Expires=Sun, 30 Mar 2025 09:13:46 GMT; HttpOnly"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"314"},{"key":"ETag","value":"W/\"13a-8XKZtcwcirHdDo+LiwwJb3WHObQ\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZTkwM2Q5OWRmZDE4NWUwNjg4ZjU1NCIsImlhdCI6MTc0MzMyNDIyNiwiZXhwIjoxNzQzMzI2MDI2fQ.slEZgSkKyvbiAe2LJ7Bmp0XByDElRdHYzJBD-pG-ZTw\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"67e903d99dfd185e0688f554\",\n            \"name\": \"user\",\n            \"email\": \"user@gmail.com\",\n            \"role\": \"user\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"84939d9f-dedc-4d72-b2f2-41c9b824e857"},{"name":"forgotPassword","id":"9962c28f-ccbe-4b67-bebd-511b558f3b87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"test1@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于发起忘记密码流程。用户只需提供注册时使用的邮箱，系统会向该邮箱发送一封包含重置密码令牌链接的邮件。用户可以通过点击邮件中的链接来重置密码。</p>\n<p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>是</td>\n<td>用户注册时使用的邮箱</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>响应说明：</strong></p>\n<p>接口返回操作状态和提示信息，表明重置密码的令牌已发送至指定邮箱。</p>\n<img src=\"https://content.pstmn.io/329e2ea5-a969-4627-ab91-3df9bda04efe/aW1hZ2UucG5n\" width=\"1678\" height=\"642\" />\n\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：发送成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误或数据验证失败（例如邮箱格式错误、密码不一致等）。</p>\n</li>\n<li><p><strong>404</strong>：邮箱不存在，没有注册过。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"dfd14ee0-4331-4bf1-a15b-ceed6f821edb","name":"forgotPassword","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"test1@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"66"},{"key":"Date","value":"Tue, 01 Apr 2025 03:55:37 GMT"},{"key":"X-RateLimit-Reset","value":"1743481631"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"53"},{"key":"ETag","value":"W/\"35-7vJh+jMVY1tC+XB9d74hwdymChI\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Token sent to email!\"\n}"}],"_postman_id":"9962c28f-ccbe-4b67-bebd-511b558f3b87"},{"name":"resetPassword","id":"8adb71ff-6e46-4fa4-a8a9-3d89adce4994","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"password\":\"000000001\",\n  \"passwordConfirm\": \"000000001\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/{{reset_token}}","description":"<p><strong>接口说明：</strong></p>\n<p>该接口用于根据用户收到的重置密码 token 重置用户密码。用户需要在请求 URL 中附加 token，并在请求体中提供新的密码和确认密码。系统会验证 token 的有效性，确认新密码后更新用户密码。</p>\n<p><strong>请求 URL：</strong></p>\n<p><code>{{URL}}api/v1/users/resetPassword/{{token}}</code></p>\n<p>（请将收到的 token 替换到 URL 中对应位置）</p>\n<p><strong>请求体参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>是</td>\n<td>新密码</td>\n</tr>\n<tr>\n<td>passwordConfirm</td>\n<td>string</td>\n<td>是</td>\n<td>确认新密码，必须与 password 一致</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，密码已更新。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误、密码不一致或 token 无效。</p>\n</li>\n<li><p><strong>401</strong>：认证失败或 token 已过期。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n<p><strong>备注：</strong>  </p>\n<p>请确保在请求 URL 中正确附加重置密码的 token，并在请求体中提供有效的新密码信息。操作成功后，新密码将立即生效，建议用户及时更新并妥善保管。</p>\n","urlObject":{"path":["v1","users","resetPassword","{{reset_token}}"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"91f55175-df73-4291-88eb-e8e68b44193e","name":"resetPassword","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"password\":\"000000001\",\n  \"passwordConfirm\": \"000000001\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/{{reset_token}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"55"},{"key":"Date","value":"Tue, 01 Apr 2025 04:08:25 GMT"},{"key":"X-RateLimit-Reset","value":"1743481631"},{"key":"Set-Cookie","value":"jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZTkxNWY0ZGMzOTE2OTYyMDM2NmU1YiIsImlhdCI6MTc0MzQ4MDUwNiwiZXhwIjoxNzQzNDgyMzA2fQ.slQ1RH9KGnLT6ZwSFcdDKyvrlqKY7f4FLJF-1EwhHc0; Path=/; Expires=Tue, 01 Apr 2025 04:38:26 GMT; HttpOnly"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"359"},{"key":"ETag","value":"W/\"167-Wt4z8MTzklz1ANqFy5UOOLCXfa0\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZTkxNWY0ZGMzOTE2OTYyMDM2NmU1YiIsImlhdCI6MTc0MzQ4MDUwNiwiZXhwIjoxNzQzNDgyMzA2fQ.slQ1RH9KGnLT6ZwSFcdDKyvrlqKY7f4FLJF-1EwhHc0\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"67e915f4dc39169620366e5b\",\n            \"name\": \"t\",\n            \"email\": \"test1@gmail.com\",\n            \"role\": \"user\",\n            \"__v\": 0,\n            \"passwordChangedAt\": \"2025-04-01T04:08:25.520Z\"\n        }\n    }\n}"}],"_postman_id":"8adb71ff-6e46-4fa4-a8a9-3d89adce4994"},{"name":"updatePassword","id":"36c95b6a-e7c0-4255-835e-8d1f57609506","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"currentPassword\": \"12345678\",\n  \"password\":\"000000002\",\n  \"passwordConfirm\": \"000000002\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updatePassword","description":"<p><strong>接口说明：</strong>  </p>\n<p>该接口用于更新当前已认证用户的密码。用户需要提供当前密码以验证身份，并提交新密码及其确认。系统将验证当前密码是否正确，并确保新密码符合要求，验证通过后更新用户密码。</p>\n<p><strong>请求参数：</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>参数名称</th>\n<th>类型</th>\n<th>必填</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>currentPassword</td>\n<td>string</td>\n<td>是</td>\n<td>当前密码，用于验证用户身份</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>是</td>\n<td>新密码</td>\n</tr>\n<tr>\n<td>passwordConfirm</td>\n<td>string</td>\n<td>是</td>\n<td>新密码确认，必须与 password 一致</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>响应说明：</strong>  </p>\n<p>成功更新密码后，接口将返回操作状态信息，提示密码已成功更新。</p>\n<p><strong>错误码说明：</strong></p>\n<ul>\n<li><p><strong>200</strong>：请求成功，密码更新成功。</p>\n</li>\n<li><p><strong>400</strong>：请求参数错误，如新密码与确认密码不一致。</p>\n</li>\n<li><p><strong>401</strong>：身份验证失败或当前密码错误。</p>\n</li>\n<li><p><strong>500</strong>：服务器内部错误，请稍后重试或联系管理员。</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","updatePassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"73420feb-dc07-40f4-8c69-e51bd0db34bd","name":"updatePassword","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"currentPassword\": \"12345678\",\n  \"password\":\"000000002\",\n  \"passwordConfirm\": \"000000002\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updatePassword"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"Strict-Transport-Security","value":"max-age=31536000; includeSubDomains"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"49"},{"key":"Date","value":"Tue, 01 Apr 2025 04:13:08 GMT"},{"key":"X-RateLimit-Reset","value":"1743481631"},{"key":"Set-Cookie","value":"jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWI2MzJkZmJhY2JlODg5YjJkMTM0NSIsImlhdCI6MTc0MzQ4MDc4OSwiZXhwIjoxNzQzNDgyNTg5fQ.VmvkAJcW4dit17fLyaNMvfDGDbl_MiUBzfqT9rascvI; Path=/; Expires=Tue, 01 Apr 2025 04:43:09 GMT; HttpOnly"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"362"},{"key":"ETag","value":"W/\"16a-bIYPRIcNre0L3f6HsQCZ+SqvPEk\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWI2MzJkZmJhY2JlODg5YjJkMTM0NSIsImlhdCI6MTc0MzQ4MDc4OSwiZXhwIjoxNzQzNDgyNTg5fQ.VmvkAJcW4dit17fLyaNMvfDGDbl_MiUBzfqT9rascvI\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"67eb632dfbacbe889b2d1345\",\n            \"name\": \"test\",\n            \"email\": \"test3@gmail.com\",\n            \"role\": \"user\",\n            \"__v\": 0,\n            \"passwordChangedAt\": \"2025-04-01T04:13:08.744Z\"\n        }\n    }\n}"}],"_postman_id":"36c95b6a-e7c0-4255-835e-8d1f57609506"}],"id":"0e9e78cb-3a83-4332-ab09-9812a459acc8","_postman_id":"0e9e78cb-3a83-4332-ab09-9812a459acc8","description":""}]}