Skip to content

4-Добавили описание ручек#1

Open
Tusenka wants to merge 1 commit intomainfrom
feater/4
Open

4-Добавили описание ручек#1
Tusenka wants to merge 1 commit intomainfrom
feater/4

Conversation

@Tusenka
Copy link
Copy Markdown
Collaborator

@Tusenka Tusenka commented May 4, 2026

No description provided.

@Tusenka Tusenka changed the title 4-Add endpoints descriptions 4-Добавили описание ручек May 4, 2026

# Ручки

### post /login - returns user_id based on yandex code
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше назвать /api/v1/auth/login
и в остальных местах тоже /api/v1/сервис/ручка

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для внутренних нужд ручки можно называть internal вместо api

DATABASE_URL=postgresql+asyncpg://user_db:user_pass@user_db:5432/user_db

# Yandex OAuth
YANDEX_CLIENT_ID=<YANDEX CLIENT ID>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для начала реально можно просто через яндекс логин сделать, потом можно будет докрутить другие способы входа

"user_id":"<user_id>"
}`


Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ручку logout реально можно по идее не делать, можно просто ждать просрочки jwt токена. jwt стэйтлес будем делать тогда для начала

}`

### delete /text/{id}
delete text by id, for auhot and admins only.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

роли тогда уже в шлюзе можно будет проверять


Возвращает текст по id

### get /texts
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это нам вряд ли пригодится, поиска и фильтров внутри курса не будет

Deactivate course - admin only

### post /couse/{id}/complete/{item_id}
Deactivate course - admin only No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут еще нужно кучу ручек насчет подтем и пунктов и например ручку которая будет вызываться после загрузки контента в контент сервис которая просто для пункта сохраняет id и тип контента из контент сервиса

unban user

### delete /user/{id}
delete user No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут еще нужны ручки которые за прогресс юзеров курса будут отвечать. Типо из курса такой то юзер прочитал или посмотрел то-то или решил/не решил то-то чтобы на фронте помечать какие пункты и темы закрыл, как на степике зеленым помечается. Для прогресса проходящих курс отдельную табличку надо

Comment thread docker-compose.yml
- content_service
- submission_service
networks:
- algobot_network
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

algobotat_network тогда уже). Решил так назвать потому что это и Algo Botat типо ботать алгоритмы, и алго ботат можно на лого ботат нарисовать, запоминается) И All go botat - все идем ботать


### get /submits
params:
page
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пагинацию можно и на фронте сделать, тут скорее еще user_id надо

for a user return his submissions
for admins returns all submissions

### delete /submit/{id}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это не очень понятно зачем. Можно пока и без нее

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants