Browse Source

refactor(validateToken): code refactor

AykutSarac 2 năm trước cách đây
mục cha
commit
edff409b7d
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/services/google.ts

+ 3 - 3
src/services/google.ts

@@ -1,7 +1,7 @@
-import axios, { AxiosResponse } from "axios";
+import axios from "axios";
 
-const validateToken = async <T>(token: string): Promise<AxiosResponse<T>> => {
-  return await axios.get(
+const validateToken = async <T>(token: string) => {
+  return await axios.get<T>(
     `https://oauth2.googleapis.com/tokeninfo?id_token=${token}`
   );
 };