WIP: Add users system, required for uploading new pastes #77
@ -33,7 +33,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := db.CreateAdminUser(database, "admin"); err != nil {
|
if err := db.CreateAdminUser(database, "admin"); err != nil {
|
||||||
|
|||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
yorick marked this conversation as resolved
mrngm
commented
(not (not `go fmt`ed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
go rushlink.StartMetricsServer(*metricsListen, database, filestore)
|
go rushlink.StartMetricsServer(*metricsListen, database, filestore)
|
||||||
|
@ -39,7 +39,7 @@ type FileUpload struct {
|
|||||||
PubID uuid.UUID `gorm:"uniqueIndex"`
|
PubID uuid.UUID `gorm:"uniqueIndex"`
|
||||||
|
|
||||||
// User ID that created this file
|
// User ID that created this file
|
||||||
CreatedBy uint `gorm:"index"`
|
CreatedBy uint `gorm:"index"`
|
||||||
yorick marked this conversation as resolved
mrngm
commented
(not (not `go fmt`ed)
|
|||||||
|
|
||||||
// FileName contains the original filename of this FileUpload.
|
// FileName contains the original filename of this FileUpload.
|
||||||
FileName string
|
FileName string
|
||||||
|
@ -24,7 +24,7 @@ type Paste struct {
|
|||||||
ID uint `gorm:"primaryKey"`
|
ID uint `gorm:"primaryKey"`
|
||||||
Type PasteType `gorm:"index"`
|
Type PasteType `gorm:"index"`
|
||||||
State PasteState `gorm:"index"`
|
State PasteState `gorm:"index"`
|
||||||
CreatedBy uint `gorm:"index"`
|
CreatedBy uint `gorm:"index"`
|
||||||
Content []byte
|
Content []byte
|
||||||
Key string `gorm:"uniqueIndex"`
|
Key string `gorm:"uniqueIndex"`
|
||||||
DeleteToken string
|
DeleteToken string
|
||||||
|
Loading…
Reference in New Issue
Block a user
I would be fine with a command line option that allows the operator to create users.