{"id":850,"date":"2024-11-23T11:40:15","date_gmt":"2024-11-23T03:40:15","guid":{"rendered":"https:\/\/abytelalala.cn\/?p=850"},"modified":"2024-11-25T21:23:19","modified_gmt":"2024-11-25T13:23:19","slug":"%e6%90%ad%e5%bb%ba%e4%bd%9c%e4%b8%9a%e6%96%87%e4%bb%b6%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/abytelalala.cn\/index.php\/2024\/11\/23\/%e6%90%ad%e5%bb%ba%e4%bd%9c%e4%b8%9a%e6%96%87%e4%bb%b6%e6%9c%8d%e5%8a%a1%e5%99%a8\/","title":{"rendered":"\u642d\u5efa\u4f5c\u4e1a\u6587\u4ef6\u670d\u52a1\u5668"},"content":{"rendered":"\n<p>apt install npm<br>apt install nodejs<br>mkdir file-server<br>cd file-server<br>npm init -y<br>npm install express multer mysql2<br>npm install uuid<br>npm install bcryptjs<br>mysql -u root<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p>nano server.js<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const express = require('express');\nconst multer = require('multer');\nconst path = require('path');\nconst mysql = require('mysql2');\nconst bcrypt = require('bcryptjs');  \/\/ \u7528\u4e8e\u5bc6\u7801\u52a0\u5bc6\nconst bodyParser = require('body-parser');\n\nconst cors = require('cors');\napp.use(cors({\n  origin: '*', \/\/ \u6682\u65f6\u5141\u8bb8\u6240\u6709\u6765\u6e90\n  methods: &#91;'GET', 'POST'], \/\/ \u5141\u8bb8\u7684 HTTP \u65b9\u6cd5\n  allowedHeaders: &#91;'Content-Type'], \/\/ \u5141\u8bb8\u7684\u8bf7\u6c42\u5934\n}));\n\nconst app = express();\nconst port = 817;\n\/\/ \u63d0\u4f9b public \u6587\u4ef6\u5939\u4e0b\u7684\u9759\u6001\u6587\u4ef6\napp.use(express.static('public'));\n\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: true }));\n\n\/\/ \u6587\u4ef6\u5b58\u50a8\u914d\u7f6e\nconst assignmentStorage = multer.diskStorage({\n  destination: (req, file, cb) => {\n    cb(null, 'uploads\/assignments\/');\n  },\n  filename: (req, file, cb) => {\n    cb(null, Date.now() + path.extname(file.originalname));\n  }\n});\n\nconst submissionStorage = multer.diskStorage({\n  destination: (req, file, cb) => {\n    cb(null, 'uploads\/submissions\/');\n  },\n  filename: (req, file, cb) => {\n    cb(null, Date.now() + path.extname(file.originalname));\n  }\n});\n\nconst assignmentUpload = multer({ storage: assignmentStorage });\nconst submissionUpload = multer({ storage: submissionStorage });\n\n\/\/ \u6570\u636e\u5e93\u8fde\u63a5\nconst db = mysql.createConnection({\n  host: 'localhost',\n  user: 'root',\n  password: '123456',  \/\/ \u6839\u636e\u6570\u636e\u5e93\u914d\u7f6e\u4fee\u6539\u5bc6\u7801\n  database: 'file_server'\n});\n\ndb.connect((err) => {\n  if (err) {\n    console.error('\u6570\u636e\u5e93\u8fde\u63a5\u5931\u8d25:', err);\n    return;\n  }\n  console.log('\u6570\u636e\u5e93\u8fde\u63a5\u6210\u529f');\n});\n\n\/\/ \u767b\u5f55\u63a5\u53e3\uff1a\u9a8c\u8bc1\u7528\u6237\u8eab\u4efd\napp.post('\/login', (req, res) => {\n  const { username, password } = req.body;\n\n  \/\/ \u67e5\u8be2\u7528\u6237\u4fe1\u606f\n  const query = 'SELECT * FROM users WHERE username = ?';\n  db.query(query, &#91;username], (err, results) => {\n    if (err) {\n      return res.status(500).send('\u6570\u636e\u5e93\u67e5\u8be2\u5931\u8d25');\n    }\n\n    if (results.length === 0) {\n      return res.status(404).send('\u7528\u6237\u4e0d\u5b58\u5728');\n    }\n\n    const user = results&#91;0];\n    \/\/ \u4f7f\u7528 bcrypt \u9a8c\u8bc1\u5bc6\u7801\n    bcrypt.compare(password, user.password, (err, match) => {\n      if (err || !match) {\n        return res.status(401).send('\u5bc6\u7801\u9519\u8bef');\n      }\n\n      \/\/ \u8fd4\u56de\u7528\u6237 ID \u548c\u89d2\u8272\u4fe1\u606f\n      res.send({\n        userId: user.id,\n        role: user.role\n      });\n    });\n  });\n});\n\napp.get('\/files\/assignments', (req, res) => {\n  db.query(\"SELECT filename, file_path FROM files WHERE type='assignment'\", (err, results) => {\n    if (err) return res.status(500).send('\u67e5\u8be2\u5931\u8d25');\n    res.send(results);\n  });\n});\n\napp.get('\/files\/submissions', (req, res) => {\n  db.query(\"SELECT filename, file_path FROM files WHERE type='submission'\", (err, results) => {\n    if (err) return res.status(500).send('\u67e5\u8be2\u5931\u8d25');\n    res.send(results);\n  });\n});\n\napp.get('\/download', (req, res) => {\n  const filePath = req.query.filePath;\n  res.download(filePath, (err) => {\n    if (err) res.status(500).send('\u4e0b\u8f7d\u5931\u8d25');\n  });\n});\n\n\n\/\/ \u4e0a\u4f20\u4f5c\u4e1a\u9898\u76ee\u63a5\u53e3\uff08\u6559\u5e08\uff09\napp.post('\/upload\/assignment', assignmentUpload.single('file'), (req, res) => {\n  const userId = req.body.userId;\n  \n  \/\/ \u9a8c\u8bc1\u7528\u6237\u662f\u5426\u4e3a\u6559\u5e08\n  const query = 'SELECT role FROM users WHERE id = ?';\n  db.query(query, &#91;userId], (err, results) => {\n    if (err || results.length === 0) {\n      return res.status(500).send('\u7528\u6237\u9a8c\u8bc1\u5931\u8d25');\n    }\n\n    const userRole = results&#91;0].role;\n    if (userRole !== 'teacher') {\n      return res.status(403).send('\u4ec5\u6559\u5e08\u53ef\u4ee5\u4e0a\u4f20\u4f5c\u4e1a\u9898\u76ee');\n    }\n\n    const { originalname, path, size } = req.file;\n\n    const insertQuery = 'INSERT INTO files (user_id, filename, file_path, size, type) VALUES (?, ?, ?, ?, ?)';\n    db.query(insertQuery, &#91;userId, originalname, path, size, 'assignment'], (err, result) => {\n      if (err) {\n        return res.status(500).send('\u4f5c\u4e1a\u9898\u76ee\u4e0a\u4f20\u5931\u8d25');\n      }\n      res.send('\u4f5c\u4e1a\u9898\u76ee\u4e0a\u4f20\u6210\u529f');\n    });\n  });\n});\n\n\n\/\/ \u4e0a\u4f20\u4f5c\u4e1a\u63d0\u4ea4\u63a5\u53e3\uff08\u5b66\u751f\uff09\napp.post('\/upload\/submission', submissionUpload.single('file'), (req, res) => {\n  const userId = req.body.userId;\n  \n  \/\/ \u9a8c\u8bc1\u7528\u6237\u662f\u5426\u4e3a\u5b66\u751f\n  const query = 'SELECT role FROM users WHERE id = ?';\n  db.query(query, &#91;userId], (err, results) => {\n    if (err || results.length === 0) {\n      return res.status(500).send('\u7528\u6237\u9a8c\u8bc1\u5931\u8d25');\n    }\n\n    const userRole = results&#91;0].role;\n    if (userRole !== 'student') {\n      return res.status(403).send('\u4ec5\u5b66\u751f\u53ef\u4ee5\u4e0a\u4f20\u4f5c\u4e1a');\n    }\n\n    const { originalname, path, size } = req.file;\n\n    const insertQuery = 'INSERT INTO files (user_id, filename, file_path, size, type) VALUES (?, ?, ?, ?, ?)';\n    db.query(insertQuery, &#91;userId, originalname, path, size, 'submission'], (err, result) => {\n      if (err) {\n        return res.status(500).send('\u4f5c\u4e1a\u63d0\u4ea4\u5931\u8d25');\n      }\n      res.send('\u4f5c\u4e1a\u63d0\u4ea4\u6210\u529f');\n    });\n  });\n});\n\n\/\/ \u542f\u52a8\u670d\u52a1\u5668\napp.listen(port,'0.0.0.0',() => {\n  console.log(`\u670d\u52a1\u5668\u542f\u52a8\uff0c\u76d1\u542c\u7aef\u53e3 ${port}`);\n});\n\n\n\n\n<\/code><\/pre>\n\n\n\n<p>mkdir uploads<br>mkdir -p uploads\/assignments<br>mkdir -p uploads\/submissions<br>apt install mysql-client-core-8.0<br>apt install mysql-server<br>mysql -u root -p<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE file_server;\n\nUSE file_server;\n\n-- \u521b\u5efa\u7528\u6237\u8868\nCREATE TABLE users (\n  id INT AUTO_INCREMENT PRIMARY KEY,\n  username VARCHAR(100) NOT NULL,\n  password VARCHAR(255) NOT NULL\n);\n\n-- \u521b\u5efa\u6587\u4ef6\u8868\nCREATE TABLE files (\n  id INT AUTO_INCREMENT PRIMARY KEY,\n  user_id INT NOT NULL,\n  filename VARCHAR(255) NOT NULL,\n  file_path VARCHAR(255) NOT NULL,\n  size INT NOT NULL,\n  upload_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n  type ENUM('assignment', 'submission') NOT NULL,  -- \u7c7b\u578b\uff1a\u4f5c\u4e1a\u9898\u76ee\u6216\u63d0\u4ea4\u6587\u4ef6\n  FOREIGN KEY (user_id) REFERENCES users(id)\n);\n-- \u4fee\u6539 users \u8868\uff0c\u6dfb\u52a0\u89d2\u8272\u5b57\u6bb5\nALTER TABLE users ADD COLUMN role ENUM('teacher', 'student') NOT NULL;\n\n-- \u66f4\u65b0\u7528\u6237\u89d2\u8272 (\u5047\u8bbe\u524d10\u4e2a\u7528\u6237\u4e2d\uff0c1-5 \u4e3a\u6559\u5e08\uff0c6-10 \u4e3a\u5b66\u751f)\nUPDATE users SET role = 'teacher' WHERE id BETWEEN 1 AND 10;\nUPDATE users SET role = 'student' WHERE id BETWEEN 11 AND 15;\n\nUSE file_server;\n\n-- \u63d2\u5165\u5341\u4e2a\u7528\u6237\uff0c\u524d\u4e94\u4e2a\u4e3a\u6559\u5e08\uff0c\u540e\u4e94\u4e2a\u4e3a\u5b66\u751f\nINSERT INTO users (username, password, role) VALUES\n('user1', 'password1', 'student'),\n('user2', 'password2', 'student'),\n('user3', 'password3', 'student'),\n('user4', 'password4', 'student'),\n('user5', 'password5', 'student'),\n('user6', 'password6', 'student'),\n('user7', 'password7', 'student'),\n('user8', 'password8', 'student'),\n('user9', 'password9', 'student'),\n('user11', 'password11', 'teacher'),\n('user10', 'password10', 'student');\n\n<\/code><\/pre>\n\n\n\n<p>mkdir public<br>cd public<br>nano login.html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;\u7528\u6237\u767b\u5f55&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;h2&gt;\u7528\u6237\u767b\u5f55&lt;\/h2&gt;\n  &lt;form id=\"loginForm\"&gt;\n    &lt;label for=\"username\"&gt;\u7528\u6237\u540d\uff1a&lt;\/label&gt;\n    &lt;input type=\"text\" id=\"username\" name=\"username\" required&gt;\n    &lt;br&gt;\n    &lt;label for=\"password\"&gt;\u5bc6\u7801\uff1a&lt;\/label&gt;\n    &lt;input type=\"password\" id=\"password\" name=\"password\" required&gt;\n    &lt;br&gt;\n    &lt;button type=\"submit\"&gt;\u767b\u5f55&lt;\/button&gt;\n  &lt;\/form&gt;\n  \n  &lt;div id=\"roleSection\" style=\"display:none;\"&gt;\n    &lt;h3&gt;\u9009\u62e9\u64cd\u4f5c&lt;\/h3&gt;\n    &lt;div id=\"teacherUpload\" style=\"display:none;\"&gt;\n      &lt;button onclick=\"window.location.href='\/upload\/assignment-upload.html'\"&gt;\u4e0a\u4f20\u4f5c\u4e1a\u9898\u76ee&lt;\/button&gt;\n      &lt;button onclick=\"window.location.href='\/download\/teacher-download.html'\"&gt;\u4e0b\u8f7d\u5b66\u751f\u7b54\u6848&lt;\/button&gt;\n    &lt;\/div&gt;\n    &lt;div id=\"studentUpload\" style=\"display:none;\"&gt;\n      &lt;button onclick=\"window.location.href='\/upload\/submission-upload.html'\"&gt;\u63d0\u4ea4\u4f5c\u4e1a&lt;\/button&gt;\n      &lt;button onclick=\"window.location.href='\/download\/student-download.html'\"&gt;\u4e0b\u8f7d\u4f5c\u4e1a\u9898\u76ee&lt;\/button&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n\n  &lt;script&gt;\n    const loginForm = document.getElementById('loginForm');\n    const roleSection = document.getElementById('roleSection');\n    const teacherUpload = document.getElementById('teacherUpload');\n    const studentUpload = document.getElementById('studentUpload');\n\n    loginForm.addEventListener('submit', async (event) =&gt; {\n      event.preventDefault();\n\n      const username = document.getElementById('username').value;\n      const password = document.getElementById('password').value;\n\n      const response = await fetch('\/login', {\n        method: 'POST',\n        headers: { 'Content-Type': 'application\/json' },\n        body: JSON.stringify({ username, password })\n      });\n\n      if (response.ok) {\n        const data = await response.json();\n        roleSection.style.display = 'block';\n        loginForm.style.display = 'none';\n\n        if (data.role === 'teacher') {\n          teacherUpload.style.display = 'block';\n        } else if (data.role === 'student') {\n          studentUpload.style.display = 'block';\n        }\n      } else {\n        alert('\u767b\u5f55\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u7528\u6237\u540d\u548c\u5bc6\u7801');\n      }\n    });\n  &lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n\n<\/code><\/pre>\n\n\n\n<p>mkdir upload<br>cd upload<br>nano assignment-upload.html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;\u4e0a\u4f20\u4f5c\u4e1a\u9898\u76ee&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;h2&gt;\u4e0a\u4f20\u4f5c\u4e1a\u9898\u76ee&lt;\/h2&gt;\n  &lt;form action=\"http:\/\/10.34.67.251:817\/upload\/assignment\" method=\"post\" enctype=\"multipart\/form-data\"&gt;\n    &lt;label for=\"file\"&gt;\u9009\u62e9\u4f5c\u4e1a\u6587\u4ef6\uff1a&lt;\/label&gt;\n    &lt;input type=\"file\" name=\"file\" required&gt;\n    &lt;br&gt;\n    &lt;label for=\"userId\"&gt;\u7528\u6237 ID\uff1a&lt;\/label&gt;\n    &lt;input type=\"text\" name=\"userId\" required&gt;\n    &lt;br&gt;\n    &lt;button type=\"submit\"&gt;\u4e0a\u4f20\u4f5c\u4e1a\u9898\u76ee&lt;\/button&gt;\n  &lt;\/form&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p>nano submission-upload.html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;\u63d0\u4ea4\u4f5c\u4e1a&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;h2&gt;\u63d0\u4ea4\u4f5c\u4e1a&lt;\/h2&gt;\n  &lt;form action=\"http:\/\/10.34.67.251:817\/upload\/submission\" method=\"post\" enctype=\"multipart\/form-data\"&gt;\n    &lt;label for=\"file\"&gt;\u9009\u62e9\u4f5c\u4e1a\u6587\u4ef6\uff1a&lt;\/label&gt;\n    &lt;input type=\"file\" name=\"file\" required&gt;\n    &lt;br&gt;\n    &lt;label for=\"userId\"&gt;\u7528\u6237 ID\uff1a&lt;\/label&gt;\n    &lt;input type=\"text\" name=\"userId\" required&gt;\n    &lt;br&gt;\n    &lt;button type=\"submit\"&gt;\u63d0\u4ea4\u4f5c\u4e1a&lt;\/button&gt;\n  &lt;\/form&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p>mkdir download\/<br>nano student-download.html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;\u4e0b\u8f7d\u4f5c\u4e1a\u9898\u76ee&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;h2&gt;\u4e0b\u8f7d\u4f5c\u4e1a\u9898\u76ee&lt;\/h2&gt;\n  &lt;ul id=\"fileList\"&gt;&lt;\/ul&gt;\n  &lt;script&gt;\n    async function fetchFiles() {\n      const response = await fetch('\/files\/assignments');\n      const files = await response.json();\n      const fileList = document.getElementById('fileList');\n      files.forEach(file =&gt; {\n        const li = document.createElement('li');\n        li.innerHTML = `&lt;a href=\"\/download?filePath=${file.file_path}\"&gt;${file.filename}&lt;\/a&gt;`;\n        fileList.appendChild(li);\n      });\n    }\n    fetchFiles();\n  &lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p>nano teacher-download.html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;\u4e0b\u8f7d\u5b66\u751f\u7b54\u6848&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;h2&gt;\u4e0b\u8f7d\u5b66\u751f\u7b54\u6848&lt;\/h2&gt;\n  &lt;ul id=\"fileList\"&gt;&lt;\/ul&gt;\n  &lt;script&gt;\n    async function fetchFiles() {\n      const response = await fetch('\/files\/submissions');\n      const files = await response.json();\n      const fileList = document.getElementById('fileList');\n      files.forEach(file =&gt; {\n        const li = document.createElement('li');\n        li.innerHTML = `&lt;a href=\"\/download?filePath=${file.file_path}\"&gt;${file.filename}&lt;\/a&gt;`;\n        fileList.appendChild(li);\n      });\n    }\n    fetchFiles();\n  &lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p>nano encryptPasswords.js<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const bcrypt = require('bcryptjs');\nconst mysql = require('mysql2');\n\n\/\/ \u521b\u5efa\u6570\u636e\u5e93\u8fde\u63a5\nconst db = mysql.createConnection({\n  host: 'localhost',\n  user: 'root',\n  password: '123456',  \/\/ \u8bf7\u6839\u636e\u60a8\u7684\u6570\u636e\u5e93\u914d\u7f6e\u4fee\u6539\u5bc6\u7801\n  database: 'file_server'\n});\n\n\/\/ \u83b7\u53d6\u6240\u6709\u7528\u6237\u7684\u5bc6\u7801\u5e76\u52a0\u5bc6\nconst encryptPasswords = async () =&gt; {\n  db.query('SELECT id, password FROM users', async (err, results) =&gt; {\n    if (err) {\n      console.error('\u67e5\u8be2\u7528\u6237\u5931\u8d25:', err);\n      return;\n    }\n\n    for (const user of results) {\n      \/\/ \u5bf9\u5bc6\u7801\u8fdb\u884c\u52a0\u5bc6\n      const hashedPassword = await bcrypt.hash(user.password, 10);\n      \n      \/\/ \u66f4\u65b0\u6570\u636e\u5e93\u4e2d\u7684\u5bc6\u7801\u4e3a\u52a0\u5bc6\u540e\u7684\u5bc6\u7801\n      db.query('UPDATE users SET password = ? WHERE id = ?', &#91;hashedPassword, user.id], (updateErr, updateResult) =&gt; {\n        if (updateErr) {\n          console.error('\u66f4\u65b0\u5bc6\u7801\u5931\u8d25:', updateErr);\n        } else {\n          console.log(`\u7528\u6237 ID: ${user.id} \u5bc6\u7801\u5df2\u66f4\u65b0`);\n        }\n      });\n    }\n  });\n};\n\n\/\/ \u8c03\u7528\u51fd\u6570\nencryptPasswords();\n<\/code><\/pre>\n\n\n\n<p>node encryptPasswords.js<br>node server.js<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>apt install npmapt install nodejsmkdir file-servercd fi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,8],"tags":[],"class_list":["post-850","post","type-post","status-publish","format-standard","hentry","category-22","category-8"],"_links":{"self":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts\/850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/comments?post=850"}],"version-history":[{"count":47,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts\/850\/revisions"}],"predecessor-version":[{"id":897,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/posts\/850\/revisions\/897"}],"wp:attachment":[{"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/media?parent=850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/categories?post=850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abytelalala.cn\/index.php\/wp-json\/wp\/v2\/tags?post=850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}