qwqcode
44742c149e
fix(db/migrate): issue with root id generation
2024-04-24 23:04:09 +08:00
qwqcode
ec6d2b2e60
fix(db/migrator): remove foreign key constraints and better root_id generation ( #835 )
...
Add function to delete all foreign key constraints when migration.
Leave relationship maintenance to the program and reduce the difficulty of database management. Because there are many different DBs and the implementation of foreign keys may be different, and the DB may not support foreign keys, so don't rely on the foreign key function of the DB system.
2024-04-14 23:46:22 +08:00
qwqcode
73d8ea97ed
perf(conf/upgit): disallow custom executable path of upgit for security ( #817 )
...
BREAKING CHANGE: For UpGit users: Due to security reasons, Artalk no longer allows configuring the executable file path (img_upload.upgit.exec) for upgit. Please add it to system environment variables instead.
2024-04-07 21:43:44 +08:00
qwqcode
c2c5a80d8d
refactor(comments_get): reduce api complexity by introducing LiteDB ( #800 )
...
* refactor(comments_get): reduce interface complexity by introducing LiteDB
* test: add unit test
* add more unit test case
2024-04-07 19:17:01 +08:00
qwqcode
b60cb585b6
perf(db): optimize N+1 query in comment list ( #799 )
2024-03-17 21:01:42 +08:00
qwqcode
929faf0722
fix(sidebar/login): cannot select a name with the same email upon login ( #781 )
2024-03-04 21:01:04 +08:00
qwqcode
8ff3f5e875
refactor(dao): validate the args of the FindCreateUser function
2024-02-14 00:21:48 +08:00
qwqcode
18123f7002
refactor(origin): extract CheckURLTrusted function
2024-02-12 20:36:43 +08:00
qwqcode
cf2094667d
feat(api/domain): add GET /conf/domain endpoint
2024-02-11 23:47:04 +08:00
qwqcode
2cd2165f06
refactor(entity/user): extract CheckPassword function
2024-02-11 23:36:19 +08:00
qwqcode
4eada4b628
feat(api/auth): invalidate old auth tokens after changing password
2024-02-11 23:34:32 +08:00
qwqcode
0097e041b1
fix(api/comments): ua field is optional and not required ( #767 )
2024-02-05 14:30:17 +08:00
qwqcode
191977c0df
feat(api): add GET /comments/:id endpoint ( #764 )
2024-02-04 20:08:38 +08:00
qwqcode
d97ad5c843
fix(ip_region): unable to output the IP region correctly ( #760 )
2024-02-03 21:43:42 +08:00
qwqcode
bc1c4d315c
fix(api/comments): counting comments issue in PostgreSQL db ( #760 ) ( #761 )
2024-02-03 15:34:25 +08:00
qwqcode
0e0b53fe9e
perf(ui/sidebar): prevent potential token leakage by clearing query in iframe url
...
The previous referrer policy was already set to `strict-origin`, but to further enhance security, this modification was made.
2024-01-30 23:07:37 +08:00
qwqcode
a40a070bdb
chore(fix/pin): fix pinned comment sort rule
2024-01-29 14:46:19 +08:00
qwqcode
589850d311
refactor(api): refactor HTTP API to version 2 ( #735 )
...
* refactor(api): refactor HTTP API to version 2
* refactor: remove forced site_origin check
* refactor: update http client
* fix
* add more api description and error code
* reduce nestings in response structures
* separate unread
* refactor(api/comments): get comments
* refactor: frontend api module
* chore: remove vite temporary file
* chore: restore swagger file
* update
* 移除为管理员分配站点名的站点隔离功能,简化实现
* refactor pagesAllFetch
* fix ci
* remove useless codes
* limiter protected paths
* add test for version endpoint
* rename handler code files
* code file separate
* fix some bug of interacting with backend
* add fetch error class for handling
* fix and rename
* refactor: checker support both `Promise` and callback fn
* fix new checker captcha iframe url
* rename and add swagger id field
* replace tab with spaces in go comment
* chore: refine
* complete the validate tag for request fields and enable `--defaultRequired`
90% of the request fields of our API are required,100% of response fields in our API are required.
Each field add validate:"required" is easy to miss.
* replace original api client with auto-generated codes
* artalk pkg apply new api client
* artalk-sidebar pkg apply new api client
* fix issues
* fix sidebar locale conf and refactor user login
* fix and refactor captcha and limiter
* fix ui testing
* add script to build http client by swagger.json
2024-01-24 21:33:30 +08:00
qwqcode
e816dd686c
fix(api/img-upload): public_path config enables the use of full url ( #659 ) ( #664 )
2023-12-17 01:29:59 +08:00
qwqcode
ec0ef12b0e
refactor(anti_spam): refactor anti_spam pkg and add unit test ( #589 )
...
* refactor(anti_spam): refactor anti_spam pkg and add unit test
* add more test
2023-09-21 21:48:56 +08:00
qwqcode
6c35fe9ded
fix(captcha): image captcha base64 response issue ( #575 )
2023-09-11 15:17:11 +08:00
qwqcode
2bdb806aaf
refactor(conf): better config.NewFromFile with error handle
2023-09-01 17:02:05 +08:00
qwqcode
dc333e5a9a
refactor(core): better AppService func with error handle
2023-09-01 17:02:04 +08:00
qwqcode
2669b0efe8
perf(cmd): support command mini boot mode
2023-09-01 17:02:03 +08:00
qwqcode
1da3f6420e
test(artransfer): add tests for artransfer
2023-09-01 17:02:02 +08:00
qwqcode
388b5b8b24
refactor(cache): refactor cache pkg
2023-09-01 17:02:00 +08:00
qwqcode
3af4482db6
refactor(cache): refactor cache pkg
2023-09-01 17:01:59 +08:00
qwqcode
d1b730113b
refactor(cors): refactor cors middleware
2023-09-01 17:01:57 +08:00
qwqcode
9f81879713
refactor(server/handler): refactor server/handler pkg
2023-09-01 17:01:57 +08:00
qwqcode
b034e514a7
refactor(cache): remove cached fields in struct to save memory ( #555 )
2023-08-23 18:06:03 +08:00
qwqcode
c20faed4e3
fix(api): comment IP data loss after editing ( #504 )
...
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-05-07 18:55:15 +08:00
qwqcode
ac4b8b0b80
fix(api/comment_add): SIGSEGV crash in comment_add ( #478 ) ( #481 )
...
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-04-06 20:46:27 +08:00
qwqcode
848969edbc
perf(notify): shorten the length of notify key ( #466 )
...
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-03-19 19:43:20 +08:00
qwqcode
b54ed8115a
refactor(captcha): abstract captcha service ( #455 )
...
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-03-10 10:39:05 +08:00
qwqcode
481a2ffe2d
fix(comment_add): ip region search in comment add api
...
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-03-09 23:29:26 +08:00
qwqcode
c8f9a08bfc
feat(captcha): support turnstile captcha by cloudflare ( #453 )
...
* feat(captcha): support turnstile captcha by cloudflare
Signed-off-by: qwqcode <qwqcode@gmail.com >
* docs: add turnstile captcha
Signed-off-by: qwqcode <qwqcode@gmail.com >
---------
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-03-09 17:17:54 +08:00
qwqcode
4679125bb7
chore(ip_region): move config dep out of ip_region pkg
...
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-03-08 11:20:46 +08:00
qwqcode
fccebf853e
feat: display IP region of comment ( #418 ) ( #447 )
...
* ip_region backend api
Signed-off-by: qwqcode <qwqcode@gmail.com >
* frontend ui support
Signed-off-by: qwqcode <qwqcode@gmail.com >
* fix backend
Signed-off-by: qwqcode <qwqcode@gmail.com >
* handle mutiple ip case
Signed-off-by: qwqcode <qwqcode@gmail.com >
* add docs
Signed-off-by: qwqcode <qwqcode@gmail.com >
---------
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-03-06 21:54:03 +08:00
qwqcode
77223c9fd7
refactor(ui/list): modify list pagination to standalone module ( #437 )
...
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-02-28 19:25:51 +08:00
qwqcode
9a680f0ef8
docs: add open api ( #360 )
...
* chore(api): add comment for open api
Signed-off-by: qwqcode <qwqcode@gmail.com >
* docs: add open api generation support
Signed-off-by: qwqcode <qwqcode@gmail.com >
---------
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-01-29 00:13:19 +08:00
qwqcode
7de6c27bd8
feat(i18n): add i18n support for sidebar ( #353 )
...
* docs: revise config example template
Signed-off-by: qwqcode <qwqcode@gmail.com >
* feat: add i18n for sidebar
Signed-off-by: qwqcode <qwqcode@gmail.com >
* feat: i18n for backend config in sidebar
Signed-off-by: qwqcode <qwqcode@gmail.com >
* feat(i18n): link FE and BE locale conf
Signed-off-by: qwqcode <qwqcode@gmail.com >
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-01-21 22:53:34 +08:00
qwqcode
1ca892fc2d
feat(i18n): translations for backend ( #344 )
...
* i18n: add i18n for server pacakge
Signed-off-by: qwqcode <qwqcode@gmail.com >
* i18n: add i18n for cmd pacakge
Signed-off-by: qwqcode <qwqcode@gmail.com >
* feat: add mustache syntax support for i18n.T in backend
Signed-off-by: qwqcode <qwqcode@gmail.com >
* i18n: improve i18n for backend further
Signed-off-by: qwqcode <qwqcode@gmail.com >
* i18n: `zh-CN` translation for backend
Signed-off-by: qwqcode <qwqcode@gmail.com >
Signed-off-by: qwqcode <qwqcode@gmail.com >
2023-01-19 20:17:32 +08:00
pluveto
697ed7282a
refactor: batch removing artalk -go postfix
2023-01-17 05:37:45 +00:00
pluveto
4f046f8d0e
refactor: move from tmp dir to root
2023-01-16 21:34:24 +08:00