From 81c9b4450bce3726733438fc860a2f7d4c242ea9 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Thu, 22 Feb 2024 23:12:26 +0330 Subject: minor changes Co-Authored-By: Alireza Ahmadi Co-Authored-By: Tara Rostami <132676256+TaraRostami@users.noreply.github.com> --- web/service/inbound.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/service') diff --git a/web/service/inbound.go b/web/service/inbound.go index 6a3dac5d..f637c0b2 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -1900,6 +1900,13 @@ func (s *InboundService) MigrationRequirements() { newStream, _ := json.MarshalIndent(stream, " ", " ") tx.Model(model.Inbound{}).Where("id = ?", ep.Id).Update("stream_settings", newStream) } + + err = tx.Raw(`UPDATE inbounds + SET tag = REPLACE(tag, '0.0.0.0:', '') + WHERE INSTR(tag, '0.0.0.0:') > 0;`).Error + if err != nil { + return + } } func (s *InboundService) MigrateDB() { -- cgit v1.2.3