aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-01-17 13:43:53 +0300
committerGravatar Vitaly Takmazov2018-01-17 13:43:53 +0300
commitf641853214daace2a73503f3a78e1f9ba29fd386 (patch)
tree0eeeab99a0512d98198289714fa06edf9e5cef9a /juick-server-jdbc/src
parent62df283157ff32dded77e833fbd0f4e3007acbbe (diff)
api: delete telegram id when got 403
Diffstat (limited to 'juick-server-jdbc/src')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java
index 325396e4..8e941531 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java
@@ -46,6 +46,12 @@ public class TelegramServiceImpl extends BaseJdbcService implements TelegramServ
return getJdbcTemplate().update("INSERT IGNORE INTO telegram_chats(chat_id) VALUES(?)", id) > 0;
}
+ @Transactional
+ @Override
+ public boolean deleteChat(Long id) {
+ return getJdbcTemplate().update("DELETE FROM telegram_chats WHERE chat_id=?", id) > 0;
+ }
+
@Transactional(readOnly = true)
@Override
public List<Long> getChats() {