Add periodic post fetching and update default Mastodon instance to mstdn.party

This commit is contained in:
2025-05-13 22:47:52 +03:30
parent 117fe3dd34
commit f9ec882cd9
2 changed files with 46 additions and 37 deletions

View File

@@ -14,14 +14,13 @@ func SetupAppContext() *internal.AppContext {
// Setup AppContext
instance := os.Getenv("INSTANCE")
if instance == "" {
instance = "https://haminoa.net"
instance = "https://mstdn.party"
}
tag := os.Getenv("TAG")
if tag == "" {
tag = "catsofmastodon"
}
// Setup database
db, err := gorm.Open(sqlite.Open("test.db"), &gorm.Config{Logger: logger.Default.LogMode(logger.Warn)})
if err != nil {
@@ -34,11 +33,11 @@ func SetupAppContext() *internal.AppContext {
// Inititlize AppContext
var appContext = &internal.AppContext{
Db: db,
Db: db,
PostService: postService,
Instance: instance,
Tag: tag,
Instance: instance,
Tag: tag,
}
return appContext
}
}