Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
removes previos mailing service
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhaev26 committed Feb 7, 2024
1 parent 8f760f4 commit c0af40f
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 295 deletions.
2 changes: 2 additions & 0 deletions connector/controllers/admin.controller.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package connector_controller

Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

database "github.com/p-society/gCSB/connector/db"
helper "github.com/p-society/gCSB/connector/helpers"
verificationModel "github.com/p-society/gCSB/connector/model"
model "github.com/p-society/gCSB/connector/model"
"go.mongodb.org/mongo-driver/bson"
)

func Verify(w http.ResponseWriter, r *http.Request) {
var message verificationModel.PlayerProfile
var message model.PlayerProfile
json.NewDecoder(r.Body).Decode(&message)
message.OTP, message.OTPExpiration = helper.GenerateOTP()
message.Password = helper.Secure_Passwords(message.Password)
Expand All @@ -36,8 +36,8 @@ func Verify(w http.ResponseWriter, r *http.Request) {

func CallbackVerification(w http.ResponseWriter, r *http.Request) {

var callback_message verificationModel.Callback
var retrieved_message verificationModel.PlayerProfile
var callback_message model.Callback
var retrieved_message model.PlayerProfile
_ = json.NewDecoder(r.Body).Decode(&callback_message)
PlayerCollection := database.Database.Collection("Player")
filter := bson.M{"email": callback_message.Email}
Expand All @@ -58,8 +58,8 @@ func CallbackVerification(w http.ResponseWriter, r *http.Request) {
}

func Login(w http.ResponseWriter, r *http.Request) {
var Logindata verificationModel.Login
var retrieved_message verificationModel.PlayerProfile
var Logindata model.Login
var retrieved_message model.PlayerProfile

json.NewDecoder(r.Body).Decode(&Logindata)
PlayerCollection := database.Database.Collection("Player")
Expand All @@ -77,7 +77,7 @@ func Login(w http.ResponseWriter, r *http.Request) {

func PlayerRegistration(w http.ResponseWriter, r *http.Request) {

var playerData verificationModel.PlayerProfile
var playerData model.PlayerProfile
json.NewDecoder(r.Body).Decode(&playerData)

PlayerCollection := database.Database.Collection("Player")
Expand Down Expand Up @@ -106,5 +106,5 @@ func PlayerRegistration(w http.ResponseWriter, r *http.Request) {

fmt.Println(data)

json.NewEncoder(w).Encode("DONE")
json.NewEncoder(w).Encode(data)
}
8 changes: 7 additions & 1 deletion connector/model/verification.model.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package verificationModel
package model

import (
"time"
Expand Down Expand Up @@ -32,3 +32,9 @@ type PlayerProfile struct {
OTP int `json:"otp,omitempty" bson:"otp,omitempty"`
OTPExpiration time.Time `json:"otpexpirationtime,omitempty" bson:"otpexpirationtime,omitempty"`
}

type Admin struct {
ID string `json:"_id,omitempty" bson:"_id,omitempty"`
Name string `json:"name,omitempty" bson:"name,omitempty"`
Sport string `json:"sport,omitempty" bson:"sport,omitempty"`
}
9 changes: 6 additions & 3 deletions go.work.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
75 changes: 0 additions & 75 deletions services/README.md

This file was deleted.

Empty file removed services/mailing/.dockerignore
Empty file.
23 changes: 0 additions & 23 deletions services/mailing/Dockerfile

This file was deleted.

64 changes: 0 additions & 64 deletions services/mailing/functions/sender.go

This file was deleted.

9 changes: 0 additions & 9 deletions services/mailing/go.mod

This file was deleted.

6 changes: 0 additions & 6 deletions services/mailing/go.sum

This file was deleted.

72 changes: 0 additions & 72 deletions services/mailing/services.go

This file was deleted.

34 changes: 0 additions & 34 deletions services/mailing/tests/sender_test.go

This file was deleted.

0 comments on commit c0af40f

Please sign in to comment.