mirror of
https://github.com/PretendoNetwork/wiiu-chat-secure.git
synced 2026-04-25 15:58:14 -05:00
24 lines
366 B
Go
24 lines
366 B
Go
package database
|
|
|
|
import (
|
|
"context"
|
|
|
|
"go.mongodb.org/mongo-driver/bson"
|
|
)
|
|
|
|
func AddNewUser(pid uint32) {
|
|
username := GetUsernameFromPID(pid)
|
|
|
|
filter := bson.D{
|
|
{"pid", pid},
|
|
{"missed_calls", bson.A{""}},
|
|
{"username", username},
|
|
{"status", "unallowed"},
|
|
}
|
|
|
|
_, err := usersCollection.InsertOne(context.TODO(), filter)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|