improve on the subimsion process with automatic submissions

make sure we give each user uniqe id
This commit is contained in:
Robin Olsen
2026-03-09 13:23:46 +01:00
parent d7c52383be
commit 5c4ecc841c
12 changed files with 319 additions and 184 deletions

View File

@@ -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