step 2 : auth dengan encrpty not fixed

This commit is contained in:
sindhu
2024-01-18 08:29:34 +07:00
parent a2defaaaa8
commit 2bd8da63fc
8 changed files with 235 additions and 162 deletions

View File

@@ -9,16 +9,15 @@ import (
"fmt"
"com.sismedika.com.absensi/graph/model"
staffinternal "com.sismedika.com.absensi/internal/staff"
)
// GenerateToken is the resolver for the generateToken field.
func (r *mutationResolver) GenerateToken(ctx context.Context, email string, idGoogleSignIn string) (*model.TokenResponse, error) {
panic(fmt.Errorf("not implemented: GenerateToken - generateToken"))
}
// LoginAttendance is the resolver for the loginAttendance field.
func (r *mutationResolver) LoginAttendance(ctx context.Context, email string, idGoogleSignIn string) (*model.Staff, error) {
panic(fmt.Errorf("not implemented: LoginAttendance - loginAttendance"))
func (r *mutationResolver) LoginAttendance(ctx context.Context, email string, idGoogleSignIn string, publickey string) (*model.Staff, error) {
// panic(fmt.Errorf("not implemented: LoginAttendance - loginAttendance"))
// return r.LoginAttendance(ctx, email, idGoogleSignIn, publickey)
var staffinternal staffinternal.Staff
return staffinternal.LoginAttendance(email, idGoogleSignIn, publickey)
}
// SearchStaffByEmail is the resolver for the searchStaffByEmail field.
@@ -35,3 +34,13 @@ func (r *queryResolver) StaffGetByStaffID(ctx context.Context, staffID string) (
func (r *queryResolver) StaffListBySearch(ctx context.Context, search *string, page *int, maxPerPage *int) ([]*model.Staff, error) {
panic(fmt.Errorf("not implemented: StaffListBySearch - staffListBySearch"))
}
// !!! WARNING !!!
// The code below was going to be deleted when updating resolvers. It has been copied here so you have
// one last chance to move it out of harms way if you want. There are two reasons this happens:
// - When renaming or deleting a resolver the old code will be put in here. You can safely delete
// it when you're done.
// - You have helper methods in this file. Move them out to keep these resolver files clean.
func (r *mutationResolver) GenerateToken(ctx context.Context, email string, idGoogleSignIn string, publickey string) (*model.TokenResponse, error) {
panic(fmt.Errorf("not implemented: GenerateToken - generateToken"))
}