the middle of the idiots
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"mohportal/db"
|
||||
@@ -189,7 +186,8 @@ func (us *UserService) AuthenticateUser(email, password string) (*models.User, e
|
||||
}
|
||||
|
||||
// Update last login
|
||||
user.LastLogin = &time.Now()
|
||||
loginTime := time.Now()
|
||||
user.LastLogin = &loginTime
|
||||
db.DB.Save(&user)
|
||||
|
||||
return &user, nil
|
||||
@@ -344,7 +342,8 @@ func (ps *PositionService) ClosePosition(id uuid.UUID, status string) (*models.J
|
||||
}
|
||||
|
||||
position.Status = status
|
||||
position.ClosedAt = &time.Now()
|
||||
closedTime := time.Now()
|
||||
position.ClosedAt = &closedTime
|
||||
position.UpdatedAt = time.Now()
|
||||
|
||||
if err := db.DB.Save(&position).Error; err != nil {
|
||||
@@ -551,7 +550,8 @@ func (as *ApplicationService) UpdateApplication(id uuid.UUID, status string, rev
|
||||
application.ReviewerUserID = &reviewerID
|
||||
application.Notes = notes
|
||||
application.UpdatedAt = time.Now()
|
||||
application.ReviewedAt = &time.Now()
|
||||
reviewedTime := time.Now()
|
||||
application.ReviewedAt = &reviewedTime
|
||||
|
||||
if err := db.DB.Save(&application).Error; err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user