mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-15 12:50:37 +02:00
* add admin server + service * string fixes * ban and unban user * add return * ban using admin key * ban reason * remove redundant func call * add http status * add log * anon_id_sha256 (#262) * anon_id_sha256 * refactor sha256 hash to strings package * oops Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com> * add admin server + service * ban and unban user * string fixes * add return * ban using admin key * ban reason * remove redundant func call * add http status * add log Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com> Co-authored-by: LightningTipBot <88730856+LightningTipBot@users.noreply.github.com>
16 lines
224 B
Go
16 lines
224 B
Go
package admin
|
|
|
|
import (
|
|
"github.com/LightningTipBot/LightningTipBot/internal/telegram"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type Service struct {
|
|
db *gorm.DB
|
|
}
|
|
|
|
func New(b *telegram.TipBot) Service {
|
|
return Service{
|
|
db: b.Database,
|
|
}
|
|
}
|