improve on the subimsion process with automatic submissions
make sure we give each user uniqe id
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package models
|
||||
|
||||
type Config struct {
|
||||
MongoURI string
|
||||
AutoInit bool
|
||||
RootCmd string
|
||||
WebAddress string
|
||||
@@ -11,6 +12,7 @@ type Config struct {
|
||||
}
|
||||
|
||||
var BaseConfig = Config{
|
||||
MongoURI: "mongodb+srv://lazy.wf9kdi8.mongodb.net/",
|
||||
AutoInit: false,
|
||||
RootCmd: "pm",
|
||||
IssuePrefix: "pm",
|
||||
@@ -19,6 +21,11 @@ var BaseConfig = Config{
|
||||
StatisticsStoragePath: "./.pm/stats.json",
|
||||
}
|
||||
|
||||
func (c Config) WithMongoURI(uri string) Config {
|
||||
c.MongoURI = uri
|
||||
return c
|
||||
}
|
||||
|
||||
func (c Config) WithAutoInit(autoInit bool) Config {
|
||||
c.AutoInit = autoInit
|
||||
return c
|
||||
|
||||
Reference in New Issue
Block a user