Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 40 additions & 28 deletions README.zh_Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,47 @@
- 使用 MySQL Connector/C++ 8.1.0 连接数据库
### 入门

#### 安装
### 安装(推荐)
```bash
sudo apt install git gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev openssl libssl-dev
git clone https://github.com/stepbystepcode/flypen.git --recursive
cd flypen
./run.sh
```

### 安装(常规)
<details>
<summary>过时的</summary>
<br><br>
<pre>
git clone https://github.com/stepbystepcode/flypen.git
cd flypen
git submodule update --init
cd drogon
git submodule update --init
sudo apt install git gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev openssl libssl-dev
mkdir build
cd build
cmake ..
make -j 8
sudo make install
cd ../..
cd jwt-cpp
mkdir build
cd build
cmake ..
make -j 8
sudo make install
cd ../..
wget https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
tar zxvf mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
mv mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit mysql-connector
rm mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
mkdir build
./run.sh
</pre>
</details>

```
git clone https://github.com/stepbystepcode/flypen.git
cd flypen
git submodule update --init
cd drogon
git submodule update --init
sudo apt install git gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev openssl libssl-dev
mkdir build
cd build
cmake .
make -j 8
sudo make install
cd ./...
cd jwt-cpp
mkdir build
cd build
cmake .
make -j 8
sudo make install
cd ../..
wget https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
tar zxvf mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
mv mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit mysql-connector
rm mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
mkdir build
./run.sh
```
## API 文档
请参阅 [API.md](API.md) 了解有关身份验证、用户管理、文档等 API 的详细信息。

Expand Down
4 changes: 2 additions & 2 deletions jwt_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ std::string jwtDecrypt(const std::string &token)
}
catch (const std::exception &e)
{
std::cout << "Failed to decrypt JWT: " + std::string(e.what()) << std::endl;
throw std::runtime_error("Failed to decrypt JWT");
// std::cout << "Failed to decrypt JWT: " + std::string(e.what()) << std::endl;
// throw std::runtime_error("Failed to decrypt JWT");
}
}

Expand Down
2 changes: 0 additions & 2 deletions mysql.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ void sql_unlocked(const std::string& DeleteName);
void sql_add(const std::string& username, const std::string& passwd, int avatar);
bool sql_check(const std::string&, const std::string& passwd = "@DEFAULT@");
void sql_addhistory(const std::string&, const std::string&, const std::string&, const std::string&);
void sql_addconnect(std::string connectptr);

void sql_addrequest(const std::string& send, const std::string& receiver);
void sql_process_request(const std::string&, const std::string&, const std::string&);
Json::Value sql_find_my_msg(const std::string&, const std::string&);
Expand Down