Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@


import com.restroly.qrmenu.admin.dashboard.dto.DashboardStatDTO;
import com.restroly.qrmenu.branch.repository.BranchRepository;
import com.restroly.qrmenu.common.enums.OrderStatus;
import com.restroly.qrmenu.order.repository.OrderRepository;
import com.restroly.qrmenu.order.service.OrderNotificationService;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.math.BigDecimal;
import java.text.NumberFormat;
Expand All @@ -35,7 +32,7 @@ public List<DashboardStatDTO> getDashboardStats() {
// Today's Revenue
BigDecimal todayRevenue = orderRepository.getTodayRevenue(startOfDay, endOfDay);

NumberFormat formatter = NumberFormat.getCurrencyInstance(new Locale("en", "IN"));
@SuppressWarnings("deprecation") NumberFormat formatter = NumberFormat.getCurrencyInstance(new Locale("en", "IN"));
String formattedRevenue = formatter.format(todayRevenue);

// Live Orders (Active statuses)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ public ResponseEntity<ApiResponse<AuthResponse>> login(
description = "Invalid request - token missing or invalid",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = ErrorResponse.class)
schema = @Schema(implementation = ApiErrorResponse.class)
)
),
@io.swagger.v3.oas.annotations.responses.ApiResponse(
responseCode = "401",
description = "Google token verification failed",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = ErrorResponse.class)
schema = @Schema(implementation = ApiErrorResponse.class)
)
)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//import com.restroly.qrmenu.auth.dto.LoginRequest;
//import com.restroly.qrmenu.auth.dto.RefreshTokenRequest;
//import com.restroly.qrmenu.auth.service.AuthService;
//import com.restroly.qrmenu.common.exception.BusinessException;
//import com.restroly.qrmenu.exception.BusinessException;
//import org.junit.jupiter.api.BeforeEach;
//import org.junit.jupiter.api.DisplayName;
//import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.google.api.client.json.webtoken.JsonWebSignature;
import com.restroly.qrmenu.auth.dto.AuthResponse;
import com.restroly.qrmenu.auth.dto.GoogleAuthRequest;
import com.restroly.qrmenu.common.exception.BusinessException;
import com.restroly.qrmenu.exception.BusinessException;
import com.restroly.qrmenu.security.JwtTokenProvider;
import com.restroly.qrmenu.user.entity.Role;
import com.restroly.qrmenu.user.entity.User;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
.authorizeHttpRequests(auth -> auth
.requestMatchers(PUBLIC_URLS).permitAll()
.requestMatchers(HttpMethod.GET, PUBLIC_GET_URLS).permitAll()
.requestMatchers(HttpMethod.POST, "/secure/api/**").hasAnyRole("ADMIN", "RESTAURANT_OWNER")
.requestMatchers(HttpMethod.PUT, "/secure/api/**").hasAnyRole("ADMIN", "RESTAURANT_OWNER")
.requestMatchers(HttpMethod.DELETE, "/secure/api/**").hasAnyRole("ADMIN", "RESTAURANT_OWNER")
.requestMatchers(HttpMethod.POST, "/secure/api/**").hasAnyAuthority("ADMIN", "RESTAURANT_OWNER")
.requestMatchers(HttpMethod.PUT, "/secure/api/**").hasAnyAuthority("ADMIN", "RESTAURANT_OWNER")
.requestMatchers(HttpMethod.DELETE, "/secure/api/**").hasAnyAuthority("ADMIN", "RESTAURANT_OWNER")
// All other requests require authentication
.anyRequest().authenticated()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import com.restroly.qrmenu.branch.dto.BranchResponseDTO;
import com.restroly.qrmenu.branch.service.BranchService;
import com.restroly.qrmenu.common.exception.ResourceNotFoundException;
import com.restroly.qrmenu.exception.ResourceNotFoundException;
import com.restroly.qrmenu.order.service.OrderNotificationService;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.restroly.qrmenu.user.service;

import com.restroly.qrmenu.exception.ResourceAlreadyExistsException;
import com.restroly.qrmenu.user.dto.RoleResponse;
import com.restroly.qrmenu.user.dto.UserRequest;
import com.restroly.qrmenu.user.dto.UserResponse;
Expand Down
6 changes: 3 additions & 3 deletions RestroHub/src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ google.oauth.client-id=${GOOGLE_OAUTH_CLIENT_ID:YOUR_GOOGLE_OAUTH_CLIENT_ID_HERE
# Cloudinary
# ===============================
# Set these environment variables locally. Blank values fail startup validation.
cloudinary.cloud-name=${CLOUDINARY_CLOUD_NAME:}
cloudinary.api-key=${CLOUDINARY_API_KEY:}
cloudinary.api-secret=${CLOUDINARY_API_SECRET:}
cloudinary.cloud-name=${CLOUDINARY_CLOUD_NAME:test}
cloudinary.api-key=${CLOUDINARY_API_KEY:test}
cloudinary.api-secret=${CLOUDINARY_API_SECRET:test}

# ===============================
# Service Requests Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.restroly.qrmenu.auth.dto.AuthResponse;
import com.restroly.qrmenu.auth.dto.GoogleAuthRequest;
import com.restroly.qrmenu.common.exception.BusinessException;
import com.restroly.qrmenu.security.JwtTokenProvider;
import com.restroly.qrmenu.user.entity.Role;
import com.restroly.qrmenu.user.entity.User;
Expand Down
Loading