cleaning up manager, tying it to add files
This commit is contained in:
@@ -74,7 +74,7 @@ func (db *DB) RetrieveWatchedFiles() ([]File, error) {
|
||||
// InitialiseFileInDatabase should be called before any file is copied/renamed/diff'd/patched,
|
||||
// and this should be checked before any operation occurs on a file. Any loss of data is completely as a result
|
||||
// of losing references
|
||||
func (db *DB) InitialiseFileInDatabase(file File) (int, error) {
|
||||
func (db *DB) InitializeFileInDatabase(file File) (int, error) {
|
||||
if err := db.Save(&file); err != nil {
|
||||
db.Err(err).Msg("Error initialising file in database")
|
||||
return file.ID, err
|
||||
@@ -179,7 +179,7 @@ func (db *DB) RetrieveDiffsByID(ID int) (DiffObject, error) {
|
||||
// UpdateDescription is a simple function to set the label on a patch
|
||||
func (db *DB) UpdateDescription(patchID int, description string) error {
|
||||
fmt.Println("attempting to path with id ", patchID, " description ", description)
|
||||
if err := db.Update(&DiffObject{ID: patchID, Description: description}); err != nil {
|
||||
if err := db.Update(&DiffObject{ID: patchID}); err != nil {
|
||||
db.Err(err).Msg("Error changing diff label")
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user