Commit Graph

60 Commits

Author SHA1 Message Date
frx
ca32d865b2 fix(issue-16): fix critical transaction bug and high-severity repository issues
C1: CreateBatch shadowed err with := in loop, causing partial commits on
    failure. Fixed with named return and execErr loop variable.
H1: OrderBy concatenated raw into SQL query. Added whitelist validation.
H2: Organization.List dropped query args in SelectContext call.
H3: CourseRepository.Get wrapped sql.ErrNoRows without translating to
    ErrNotFound, breaking the port contract.
Medium: Create now returns the created entity via Get; fixed prepared
    statement leak in Organization.Create; unified time.Now() to UTC.
2026-07-09 13:41:56 +00:00
596e8bbc3f Merge pull request 'Fix #14: Describe project architecture and save it into docs/ARCHITECTURE.md' (#15) from fix/issue-14 into master 2026-07-09 13:16:54 +00:00
frx
74b162a9df fix(issue-14): describe project architecture and save it into docs/ARCHITECTURE.md 2026-07-09 10:57:32 +00:00
4fe6758b64 Merge pull request 'Fix #12: ydb course repository migrate to new v3' (#13) from fix/issue-12 into master 2026-07-09 10:51:06 +00:00
frx
1e8adb4da4 fix(issue-12): ydb course repository migrate to new v3 2026-07-05 17:11:50 +00:00
91c1778a5e Merge pull request 'Fix #1: Pagination resets filters' (#11) from fix/issue-1 into master 2026-07-03 16:19:55 +00:00
frx
6d1f526394 fix(issue-1): Pagination resets filters
Move pagination logic to preserve filter query parameters (school_id,
order_by, asc, per_page) when navigating between pages.

- Added QueryParams field to Pagination struct and pageURL() helper
- Server-side: buildListCoursesQueryParams() encodes active filters into
  pagination links as query string
- Client-side: setupPaginationLinks() intercepts pagination link clicks,
  reads current filter state from DOM selects, and constructs full URLs
  with all parameters preserved
- Added data-paginated/data-base-url/data-current-page attributes to
  pagination nav for JS targeting

Closes #1
2026-07-03 16:16:39 +00:00
e09a14cf10 Merge pull request 'Fix #9: No Dockerfile to build service' (#10) from fix/issue-9 into master 2026-07-01 17:22:14 +00:00
frx
c2cefe0d32 fix(issue-9): No Dockerfile to build service 2026-07-01 17:06:02 +00:00
6d6f5e19d1 Merge pull request 'Fix #7: AGENTS.md is absent in the repository' (#8) from fix/issue-7 into master 2026-07-01 09:53:11 +00:00
5c43740a04 fix(issue-7): AGENTS.md is absent in the repository 2026-07-01 09:02:44 +00:00
228b30ccf4 Merge pull request 'fix(sravni): update entities to match current sravni.ru API' (#6) from fix/sravni-api-entity-changes into master 2026-07-01 08:05:37 +00:00
e63b254395 fix(sravni): update entities to match current sravni.ru API
dataSources changed from map[string]ReduxDataSource (objects) to
map[string]string (simple key-value pairs). Dictionaries block removed
from ReduxConfig entirely. ReduxConfigSorting now includes Name and
Direction fields alongside Property.
2026-06-28 17:09:26 +00:00
5c529ef060 fix: critical bugs from code review (data corruption, error contract, HTTP hardening) (#5)
Co-authored-by: hermes <hermes@noreply.localhost>
Co-committed-by: hermes <hermes@noreply.localhost>
2026-06-28 14:04:25 +00:00
84656c6c56 test: add unit tests for domain and business logic (#4)
Adds 14 unit tests across 3 files covering inMemoryMapper, create/list/get/stats handlers, and pagination logic.
2026-06-27 23:23:00 +00:00
39c4fa5621 chore: upgrade Go from 1.22 to 1.26
Update go.mod to require go 1.26.0 and pin toolchain go1.26.4.

Generated with go mod tidy; no code or dependency changes required.
2026-06-27 22:46:52 +00:00
348c737163 add host support 2024-09-25 00:48:47 +03:00
c3d6510a7d support metrics sending via grpc 2024-09-25 00:47:12 +03:00
c7fada2c54 update trace logic 2024-09-24 21:59:33 +03:00
c0f45d98c2 count courses by school 2024-06-16 23:55:49 +03:00
1a31006b21 Make filters by all options at once
Before script has been separated on two groups: for learning type and
course category and for school and sorting. It means when school is
choosen, learning type and course category resets on update.

TODO: need to add pagination
2024-05-02 23:24:41 +03:00
e8ac96a065 minor fix 2024-04-19 00:31:26 +03:00
3a9e01a683 rework list courses page to be flatten 2024-04-19 00:13:03 +03:00
035e9c848f minor web-view improvment 2024-04-11 10:33:14 +03:00
605e117586 add pagination 2024-04-07 23:49:06 +03:00
68810d93a7 add opentelemetry tracing 2024-04-02 15:23:22 +03:00
e7c2832865 Add command and query for organizations
* Added command and query for organizations
* Saving unknown organizations into database in `background` service
* Added `List` method in `OrganizationRepository`
2024-03-24 22:59:32 +03:00
9d2efcc1c4 implement organization repo 2024-03-24 16:51:39 +03:00
88a3cae4fa learning category repo 2024-03-16 17:44:43 +03:00
938d3cd307 add sqlite support 2024-03-12 14:44:22 +03:00
97986063df bootstrap migrate 2024-03-04 00:03:08 +03:00
251ecd94d4 minor fixes 2024-03-03 09:34:17 +03:00
6d1769ff24 make bootstrap site be more cool 2024-03-03 00:55:43 +03:00
af4a4f7840 bootstrap migrate 2024-03-02 19:34:33 +03:00
e5dfccabbf use tailwind 2024-02-10 20:22:30 +03:00
d5f76f4e07 add templ engine 2024-01-21 16:49:47 +03:00
d4974b30ec update tags 2024-01-11 19:45:02 +03:00
8b8a7618a2 finish breadcumbs and categories 2024-01-11 19:17:26 +03:00
067c63baa8 add favicon and breadcumbs 2024-01-11 11:55:37 +03:00
5fd0861e2d filter by learning_types and course_thematics 2024-01-10 00:02:40 +03:00
728c8fa59e embed assets and minor fixes 2024-01-09 15:19:53 +03:00
2c0564f68c add show course and map names 2024-01-08 18:31:35 +03:00
48f5d80f7a add more style 2024-01-05 23:03:15 +03:00
fbe9927ac3 able to update desc for course 2023-12-18 00:14:07 +03:00
1d4e8e10fb implement webserver 2023-12-17 21:21:13 +03:00
f60ebcfb36 add simple http 2023-12-17 10:01:49 +03:00
b3e14f8c45 remove course thematics validation 2023-12-15 14:29:07 +03:00
06c7997491 list by pages and rate req limits 2023-12-15 13:00:59 +03:00
2f3a6e35e9 api fixes for list filters 2023-12-14 20:59:58 +03:00
e80d5145cf add filters to cli and client 2023-12-14 20:40:35 +03:00