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
6 changes: 3 additions & 3 deletions Backend/braille_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class BrailleList(generics.ListAPIView):
queryset = Braille.objects.all()
serializer_class = BrailleSerializer
filter_backends = [filters.SearchFilter, filters.OrderingFilter]
search_fields = ['english', 'binary', 'category']
ordering_fields = ['english', 'binary', 'category']
search_fields = ['english', 'category']
ordering_fields = ['english', 'category']


class BrailleDetail(generics.RetrieveAPIView):
Expand All @@ -27,7 +27,7 @@ def get_queryset(self):
binaryinfo = 0
if info.isdigit() :
binaryinfo = int(info)
return Braille.objects.filter(Q(english=info) | Q(braille=info) | Q(binary=binaryinfo))
return Braille.objects.filter(Q(english=info) | Q(binary=binaryinfo))

def get_object(self):
queryset = self.get_queryset()
Expand Down
101 changes: 100 additions & 1 deletion Frontend/src/Services/characters.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,103 @@ export const getCharacters = async () => {
}catch (error){
throw error;
}
}
}

export const getCharacter = async (info) => {
try {
const resp = await api.get(`/braille/${info}/`);
return resp.data;
} catch (error) {
throw error;
}
}

export const getAlphabet = async () => {
try {
const resp = await api.get("/braille/?search=abc/");
return resp.data;
} catch (error) {
throw error;
}
}

export const getNumbers = async () => {
try {
const resp = await api.get("/braille/?search=123/");
return resp.data;
} catch (error) {
throw error;
}
}

export const getPunctuation = async () => {
try {
const resp = await api.get("/braille/?search=!?./");
return resp.data;
} catch (error) {
throw error;
}
}

export const getCombos = async () => {
try {
const resp = await api.get("/braille/?search=the/");
return resp.data;
} catch (error) {
throw error;
}
}

export const getBySearch = async (search) => {
try {
const resp = await api.get(`/braille/?search=${search}/`);
return resp.data;
} catch (error) {
throw error;
}
}

export const getWords = async () => {
try {
const resp = await api.get("/words/");
return resp.data;
} catch (error) {
throw error;
}
}

export const getWord = async (word) => {
try {
const resp = await api.get(`/words/${word}/`);
return resp.data;
} catch (error) {
throw error;
}
}

export const getPhrases = async () => {
try {
const resp = await api.get("/phrases/");
return resp.data;
} catch (error) {
throw error;
}
}

export const getPhraseById = async (id) => {
try {
const resp = await api.get(`/phrases/id/${id}/`);
return resp.data;
} catch (error) {
throw error;
}
}

export const getPhrase = async (phrase) => {
try {
const resp = await api.get(`/phrases/${phrase}/`);
return resp.data;
} catch (error) {
throw error;
}
}
21 changes: 0 additions & 21 deletions TouchStone/.eslintrc.cjs

This file was deleted.

24 changes: 0 additions & 24 deletions TouchStone/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions TouchStone/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions TouchStone/index.html

This file was deleted.

Loading