Git Product home page Git Product logo

Comments (10)

ilay1678 avatar ilay1678 commented on May 19, 2024

看到刚提交的修复了

from one-api.

songquanpeng avatar songquanpeng commented on May 19, 2024

好的,不过并没有完整测试,期待反馈。

from one-api.

ilay1678 avatar ilay1678 commented on May 19, 2024

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = ? ORDER BY tokens.id LIMIT 1' at line 1
SELECT * FROM tokens WHERE key = '123456' ORDER BY tokens.id LIMIT 1

from one-api.

songquanpeng avatar songquanpeng commented on May 19, 2024

Okay,收到

from one-api.

songquanpeng avatar songquanpeng commented on May 19, 2024

已推送,v0.1.6-alpha.1

我现在手头没有 MySQL 环境,只在 SQLite 测试了一下,如果方便的话麻烦测试一下,谢谢。

from one-api.

songquanpeng avatar songquanpeng commented on May 19, 2024

另外,貌似你填成令牌的名字而非 key 了,这个 key 都是生成的 UUID 随机字符串。

不过和 MySQL 报错没有关系。

from one-api.

ilay1678 avatar ilay1678 commented on May 19, 2024

另外,貌似你填成令牌的名字而非 key 了,这个 key 都是生成的 UUID 随机字符串。

不过和 MySQL 报错没有关系。

123456是我手动编辑的 脱敏嘛
1EF37E2F

from one-api.

songquanpeng avatar songquanpeng commented on May 19, 2024

哈哈哈,因为之前碰到两个人把 key 填成名字了。

from one-api.

ilay1678 avatar ilay1678 commented on May 19, 2024

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = ? ORDER BY tokens.id LIMIT 1' at line 1 SELECT * FROM tokens WHERE key = '123456' ORDER BY tokens.id LIMIT 1

经测试已修复

from one-api.

songquanpeng avatar songquanpeng commented on May 19, 2024

谢谢,原因在于 key 是 MySQL 的关键字,而 GORM 对此没有任何警告和特殊处理操作。

如果还有其他 MySQL 相关的问题,期待继续反馈。

from one-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.