Add periodic post fetching and update default Mastodon instance to mstdn.party
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user