Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-cp committed Aug 21, 2023
1 parent f62da8d commit 9df7a93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion graphql/graphql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,6 @@ func admireToken(t *testing.T, ctx context.Context, c genql.Client, tokenID pers
resp, err := admireTokenMutation(ctx, c, tokenID)
require.NoError(t, err)

fmt.Println("resp", resp);
_ = (*resp.AdmireToken).(*admireTokenMutationAdmireTokenAdmireTokenPayload)
}

Expand Down
10 changes: 4 additions & 6 deletions publicapi/interaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,7 @@ func (api InteractionAPI) AdmireToken(ctx context.Context, tokenID persist.DBID)
}

/*
check later if admire already exists
check later if admire already exists
admire, err := api.GetAdmireByActorIDAndTokenID(ctx, userID, postID)
if err == nil {
return "", persist.ErrAdmireAlreadyExists{AdmireID: admire.ID, ActorID: userID, TokenID: tokenID}
Expand All @@ -688,8 +687,7 @@ check later if admire already exists
if !errors.As(err, &notFoundErr) {
return "", err
}
**/

*/

admireID, err := api.repos.AdmireRepository.CreateTokenAdmire(ctx, tokenID, userID)
if err != nil {
Expand All @@ -708,8 +706,8 @@ check later if admire already exists
}, api.validator, nil)
if err != nil {
return "", err
}*/
fmt.Println("admire ID hereeeeeeeeee", admireID);
}
*/
return admireID, err
}

Expand Down
3 changes: 2 additions & 1 deletion service/persist/postgres/admire.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package postgres
import (
"context"
"database/sql"
"fmt"

Check failure on line 6 in service/persist/postgres/admire.go

View workflow job for this annotation

GitHub Actions / core-tests

imported and not used: "fmt"

Check failure on line 6 in service/persist/postgres/admire.go

View workflow job for this annotation

GitHub Actions / core-tests

imported and not used: "fmt"

Check failure on line 6 in service/persist/postgres/admire.go

View workflow job for this annotation

GitHub Actions / pagination-tests

imported and not used: "fmt"

Check failure on line 6 in service/persist/postgres/admire.go

View workflow job for this annotation

GitHub Actions / pagination-tests

imported and not used: "fmt"

Check failure on line 6 in service/persist/postgres/admire.go

View workflow job for this annotation

GitHub Actions / syncing-tests

imported and not used: "fmt"

Check failure on line 6 in service/persist/postgres/admire.go

View workflow job for this annotation

GitHub Actions / syncing-tests

imported and not used: "fmt"

db "github.com/mikeydub/go-gallery/db/gen/coredb"
"github.com/mikeydub/go-gallery/service/persist"
Expand All @@ -21,7 +22,6 @@ func NewAdmireRepository(queries *db.Queries) *AdmireRepository {
}

func (a *AdmireRepository) CreateAdmire(ctx context.Context, feedEventID, postID, actorID persist.DBID) (persist.DBID, error) {

var feedEventString sql.NullString
if feedEventID != "" {
feedEventString = sql.NullString{
Expand Down Expand Up @@ -70,6 +70,7 @@ func (a *AdmireRepository) CreateTokenAdmire(ctx context.Context, tokenID, actor
if err != nil {
return "", err
}

return admireID, nil

}
Expand Down

0 comments on commit 9df7a93

Please sign in to comment.