10 Commits
Author SHA1 Message Date
qwqcode cf7725edba refactor(go): bump the module version and support go install (#979)
BREAKING CHANGE: The original Go module name was `github.com/ArtalkJS/Artalk`, which has now been modified to `github.com/artalkjs/artalk/v2` (all lowercase). This change may affect the CI pipeline or other areas if you are compiling the Artalk server and have specified the fixed Go module name. Regarding the original `-ldflags -X github.com/ArtalkJS/Artalk/internal/config.Version` and `CommitHash` definitions, please remove them, as they are now obsolete. The `Version` has been hardcoded into the Go code, and the `CommitHash` is now read from the Go build info via runtime/debug’s vcs.revision value. This change only affects the server developers and does not impact the frontend UI client.
2024-09-18 21:43:43 +08:00
qwqcode 191977c0df feat(api): add GET /comments/:id endpoint (#764) 2024-02-04 20:08:38 +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 dc333e5a9a refactor(core): better AppService func with error handle 2023-09-01 17:02:04 +08:00
qwqcode 9f81879713 refactor(server/handler): refactor server/handler pkg 2023-09-01 17:01:57 +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 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
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