Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…stionTUP into dev
  • Loading branch information
yoelmarain committed Sep 27, 2024
2 parents 8bce5fa + 7a76db1 commit 1246017
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions FrontAdmin/src/API/Montos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const FetchMontos = async (offset: number, limit: number) => {
const token = Cookies.get('tokennn');

const response = await fetch(
`${URL}/pagos/compromisos/?offset=${offset}&limit=${limit}`,
`${URL}/compromisos/`,
{
method: 'GET',
headers: {
Expand Down Expand Up @@ -63,7 +63,7 @@ export const loadPDF = async (id :string,file: File) => {
const formData = new FormData();
formData.append('archivo_pdf', file);

const response = await fetch(`${URL}/pagos/compromisos/${id}/`, {
const response = await fetch(`${URL}/compromisos/${id}/`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${token}`,
Expand Down
5 changes: 3 additions & 2 deletions FrontAdmin/src/Context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ interface AuthContextType {
const AuthContext = createContext<AuthContextType | undefined>(undefined);

const AuthProvider = ({ children }: { children: ReactNode }) => {
const [rolUser, setRolUser] = useState<String[]>([]);

Check failure on line 16 in FrontAdmin/src/Context.tsx

View workflow job for this annotation

GitHub Actions / Linter de Código

Don't use `String` as a type. Use string instead

Check failure on line 16 in FrontAdmin/src/Context.tsx

View workflow job for this annotation

GitHub Actions / Linter de Código

Don't use `String` as a type. Use string instead

Check failure on line 16 in FrontAdmin/src/Context.tsx

View workflow job for this annotation

GitHub Actions / Linter de Código

Don't use `String` as a type. Use string instead
const [isAuthenticated, setIsAuthenticated] = useState(
!Cookies.get('tokennn') ? false : true
(!Cookies.get('tokennn') ) ? false : true
);
const [rolUser, setRolUser] = useState<String[]>([]);

let refreshTimeout: NodeJS.Timeout;

const refreshToken = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const NewInterfaz = ({ compromisos }: CardCargaProps) => {

const handleViewPdf = async (url: string) => {
try {
const token = Cookies.get('access_token');
const token = Cookies.get('tokennn');
const response = await fetch(url, {
headers: {
Authorization: `Bearer ${token}`,
Expand Down

0 comments on commit 1246017

Please sign in to comment.