1
0

Replaced Update*() with Edit*().

This commit is contained in:
Alexander Andreev 2023-05-06 22:18:20 +04:00
parent 32c1fa6aa1
commit f602dddff3
Signed by: Arav
GPG Key ID: D22A817D95815393
2 changed files with 6 additions and 7 deletions

View File

@ -205,8 +205,7 @@ func (d *SQLiteDatabase) NewEntry(entry *guestbook.Entry) error {
return nil return nil
} }
// UpdateEntry func (d *SQLiteDatabase) EditEntry(entry *guestbook.Entry) error {
func (d *SQLiteDatabase) UpdateEntry(entry *guestbook.Entry) error {
tx, err := d.db.Begin() tx, err := d.db.Begin()
if err != nil { if err != nil {
return err return err
@ -261,7 +260,7 @@ func (d *SQLiteDatabase) NewReply(reply *guestbook.Reply) error {
return nil return nil
} }
func (d *SQLiteDatabase) UpdateReply(reply *guestbook.Reply) error { func (d *SQLiteDatabase) EditReply(reply *guestbook.Reply) error {
tx, err := d.db.Begin() tx, err := d.db.Begin()
if err != nil { if err != nil {
return err return err

View File

@ -6,10 +6,10 @@ type Guestbook interface {
Entries(page, pageSize int64) ([]*Entry, error) Entries(page, pageSize int64) ([]*Entry, error)
Count() (int64, error) Count() (int64, error)
NewEntry(entry *Entry) error NewEntry(entry *Entry) error
UpdateEntry(entry *Entry) error EditEntry(entry *Entry) error
DeleteEntry(entryID int64) (int64, error) DeleteEntry(entryID int64) error
NewReply(reply *Reply) error NewReply(reply *Reply) error
UpdateReply(reply *Reply) error EditReply(reply *Reply) error
DeleteReply(entryID int64) (int64, error) DeleteReply(entryID int64) error
Close() error Close() error
} }