Skip to content

Commit

Permalink
Merge pull request stakwork#2484 from aliraza556/fix/text-snippet-wor…
Browse files Browse the repository at this point in the history
…kspace-uuid-format

Fix: Update TextSnippet workspace UUID field to support existing workspace ID format
  • Loading branch information
humansinstitute authored Jan 23, 2025
2 parents 2b90da8 + 44f9e62 commit 9d139ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ type Notification struct {

type TextSnippet struct {
ID uint `json:"id" gorm:"primarykey"`
WorkspaceUUID string `json:"workspace_uuid" gorm:"type:uuid;not null;index"`
WorkspaceUUID string `json:"workspace_uuid" gorm:"type:varchar(255);not null;index"`
Title string `json:"title" gorm:"type:varchar(255);not null"`
Snippet string `json:"snippet" gorm:"type:text;not null"`
DateCreated time.Time `json:"date_created" gorm:"autoCreateTime"`
Expand Down
2 changes: 1 addition & 1 deletion handlers/snippet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestCreateSnippet(t *testing.T) {
expectedCode: http.StatusUnauthorized,
},
{
name: "bad request - missing workspace_uuid",
name: "bad request missing workspace_uuid",
requestBody: map[string]string{
"title": "Test Snippet",
"snippet": "Test Content",
Expand Down

0 comments on commit 9d139ae

Please sign in to comment.