fix: compile errors
This commit is contained in:
parent
93056da792
commit
a21bff3ffb
@ -166,46 +166,9 @@ func (t *TaskRelationDeletedEvent) Name() string {
|
||||
return "task.relation.deleted"
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
// Namespace Events //
|
||||
//////////////////////
|
||||
|
||||
// NamespaceCreatedEvent represents an event where a namespace has been created
|
||||
type NamespaceCreatedEvent struct {
|
||||
Namespace *Namespace
|
||||
Doer web.Auth
|
||||
}
|
||||
|
||||
// Name defines the name for NamespaceCreatedEvent
|
||||
func (n *NamespaceCreatedEvent) Name() string {
|
||||
return "namespace.created"
|
||||
}
|
||||
|
||||
// NamespaceUpdatedEvent represents an event where a namespace has been updated
|
||||
type NamespaceUpdatedEvent struct {
|
||||
Namespace *Namespace
|
||||
Doer web.Auth
|
||||
}
|
||||
|
||||
// Name defines the name for NamespaceUpdatedEvent
|
||||
func (n *NamespaceUpdatedEvent) Name() string {
|
||||
return "namespace.updated"
|
||||
}
|
||||
|
||||
// NamespaceDeletedEvent represents a NamespaceDeletedEvent event
|
||||
type NamespaceDeletedEvent struct {
|
||||
Namespace *Namespace
|
||||
Doer web.Auth
|
||||
}
|
||||
|
||||
// TopicName defines the name for NamespaceDeletedEvent
|
||||
func (t *NamespaceDeletedEvent) Name() string {
|
||||
return "namespace.deleted"
|
||||
}
|
||||
|
||||
/////////////////
|
||||
////////////////////
|
||||
// Project Events //
|
||||
/////////////////
|
||||
////////////////////
|
||||
|
||||
// ProjectCreatedEvent represents an event where a project has been created
|
||||
type ProjectCreatedEvent struct {
|
||||
|
@ -874,7 +874,7 @@ func (p *Project) Create(s *xorm.Session, a web.Auth) (err error) {
|
||||
// @Router /projects/{id} [delete]
|
||||
func (p *Project) Delete(s *xorm.Session, a web.Auth) (err error) {
|
||||
|
||||
fullList, err := GetProjectSimpleByID(s, l.ID)
|
||||
fullList, err := GetProjectSimpleByID(s, p.ID)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -248,8 +248,9 @@ func createProjectWithEverything(s *xorm.Session, project *models.ProjectWithTas
|
||||
var lb *models.Label
|
||||
var exists bool
|
||||
if label == nil {
|
||||
continue
|
||||
}lb, exists = labels[label.Title+label.HexColor]
|
||||
continue
|
||||
}
|
||||
lb, exists = labels[label.Title+label.HexColor]
|
||||
if !exists {
|
||||
err = label.Create(s, user)
|
||||
if err != nil {
|
||||
|
@ -39,26 +39,26 @@ type Migrator struct {
|
||||
}
|
||||
|
||||
type tickTickTask struct {
|
||||
FolderName string`csv:"Folder Name"`
|
||||
ProjectName string`csv:"List Name"`
|
||||
Title string`csv:"Title"`
|
||||
FolderName string `csv:"Folder Name"`
|
||||
ProjectName string `csv:"List Name"`
|
||||
Title string `csv:"Title"`
|
||||
TagsList string `csv:"Tags"`
|
||||
Tags []string`csv:"-"`
|
||||
Content string`csv:"Content"`
|
||||
Tags []string `csv:"-"`
|
||||
Content string `csv:"Content"`
|
||||
IsChecklistString string `csv:"Is Check list"`
|
||||
IsCheckproject bool`csv:"-"`
|
||||
StartDate tickTickTime `csv:"Start Date"`
|
||||
DueDate tickTickTime `csv:"Due Date"`
|
||||
IsChecklist bool `csv:"-"`
|
||||
StartDate tickTickTime `csv:"Start Date"`
|
||||
DueDate tickTickTime `csv:"Due Date"`
|
||||
ReminderDuration string `csv:"Reminder"`
|
||||
Reminder time.Duration`csv:"-"`
|
||||
Repeat string`csv:"Repeat"`
|
||||
Priority int`csv:"Priority"`
|
||||
Status string`csv:"Status"`
|
||||
CreatedTime tickTickTime `csv:"Created Time"`
|
||||
CompletedTime tickTickTime `csv:"Completed Time"`
|
||||
Order float64`csv:"Order"`
|
||||
TaskID int64`csv:"taskId"`
|
||||
ParentID int64`csv:"parentId"`
|
||||
Reminder time.Duration `csv:"-"`
|
||||
Repeat string `csv:"Repeat"`
|
||||
Priority int `csv:"Priority"`
|
||||
Status string `csv:"Status"`
|
||||
CreatedTime tickTickTime `csv:"Created Time"`
|
||||
CompletedTime tickTickTime `csv:"Completed Time"`
|
||||
Order float64 `csv:"Order"`
|
||||
TaskID int64 `csv:"taskId"`
|
||||
ParentID int64 `csv:"parentId"`
|
||||
}
|
||||
|
||||
type tickTickTime struct {
|
||||
|
@ -33,7 +33,7 @@ type ProjectUserOpts struct {
|
||||
}
|
||||
|
||||
// ListUsers returns a list with all users, filtered by an optional search string
|
||||
func ProjectUsers(s *xorm.Session, search string, opts *ProjectUserOpts) (users []*User, err error) {
|
||||
func ListUsers(s *xorm.Session, search string, opts *ProjectUserOpts) (users []*User, err error) {
|
||||
if opts == nil {
|
||||
opts = &ProjectUserOpts{}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user