Skip to content

Commit

Permalink
fix any breaking changs
Browse files Browse the repository at this point in the history
  • Loading branch information
karngyan committed Dec 21, 2024
1 parent 68e4869 commit f2036ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions routers/models/note.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ type Note struct {
Created int64 `json:"created"`
Updated int64 `json:"updated"`
WorkspaceID int64 `json:"workspaceId"`
CreatedBy int64 `json:"createdById"`
UpdatedBy int64 `json:"updatedById"`
CreatedByID int64 `json:"createdById"`
UpdatedByID int64 `json:"updatedById"`
}

func ModelForNote(note *notes.Note) (*Note, error) {
Expand Down Expand Up @@ -56,7 +56,7 @@ func ModelForNote(note *notes.Note) (*Note, error) {
Created: note.Created,
Updated: note.Updated,
WorkspaceID: note.WorkspaceID,
CreatedBy: note.CreatedByID,
UpdatedBy: note.UpdatedByID,
CreatedByID: note.CreatedByID,
UpdatedByID: note.UpdatedByID,
}, nil
}
4 changes: 2 additions & 2 deletions ui/components/notes-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { Button } from '../ui/button'
import NotesListBatchSelectActions from './batch-select-actions'

const SortOptions = [
{ value: '-created', label: 'last created' },
{ value: '-updated', label: 'last modified' },
{ value: 'created_dsc', label: 'last created' },
{ value: 'updated_dsc', label: 'last modified' },
]

const yesterdayStart = dayjs().subtract(1, 'day').startOf('day').unix()
Expand Down
4 changes: 2 additions & 2 deletions ui/libs/utils/note.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export const defaultNewNote = (
},
created: nowInSeconds,
updated: nowInSeconds,
createdBy: user,
updatedBy: user,
createdById: user.id,
updatedById: user.id,
hasAudios: false,
hasClosedTasks: false,
hasCode: false,
Expand Down
7 changes: 4 additions & 3 deletions ui/queries/services/note-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export interface Note {
trashed: boolean
created: number
updated: number
createdBy: User
updatedBy: User
createdById: number
updatedById: number
workspaceId: number
hasAudios: boolean
hasClosedTasks: boolean
Expand All @@ -38,6 +38,7 @@ export interface NoteResponse {

export interface ListNotesResponse {
notes: Note[]
authors: User[]
nextCursor: string
}

Expand Down Expand Up @@ -90,7 +91,7 @@ export const deleteNoteMulti = async ({
export const fetchAllNotes = async ({
workspaceId,
cursor = '',
sort = '-updated',
sort = 'updated_dsc',
limit = 100,
}: {
workspaceId: number
Expand Down

0 comments on commit f2036ae

Please sign in to comment.